[cfe-dev] r127596 "Make dealloc noexcept" breaks -std=c++0x with darwin libstdc++

Sebastian Redl sebastian.redl at getdesigned.at
Tue Mar 15 13:46:17 PDT 2011


On 15.03.2011, at 12:02, Sebastian Redl wrote:

> On 15.03.2011 11:36, Jean-Daniel Dupas wrote:
>> 
>> Hello,
>> 
>> After the commit r127596, it's not longer possible to use the gcc 4.2.1 libstdc++ while compiling c++0x code.
>> 
>> For instance, just including <vector> in a file make clang emit the following diagnostics.
>> 
>> /usr/include/c++/4.2.1/new:95:7: error: exception specification in declaration does not match previous declaration
>> void* operator new(std::size_t) throw (std::bad_alloc);
>>       ^
>> 
>> I suppose this is a problem with libstdc++ 4.2.1 which is not standard compliant, but as it is widely used on OS X, maybe clang should do something to workaround the problem.
>> 
> Yes, yes it should. That occurred to me too. The change in new's throw spec can definitely be a problem.

I implemented a workaround in r127688 and r127692.

Sebastian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110315/fc00c914/attachment.html>


More information about the cfe-dev mailing list