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

Jean-Daniel Dupas devlists at shadowlab.org
Tue Mar 15 14:27:25 PDT 2011


Le 15 mars 2011 à 21:46, Sebastian Redl a écrit :

> 
> 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.

Thank you. I will test it :-)

-- Jean-Daniel




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


More information about the cfe-dev mailing list