[cfe-dev] Value of __cplusplus in GNU modes

Chris Jefferson chris at bubblescope.net
Fri May 4 08:21:55 PDT 2012

On 03/05/12 23:07, Douglas Gregor wrote:
> On May 2, 2012, at 3:34 PM, Richard Smith<richard at metafoo.co.uk>  wrote:
>> Hi,
>> As of version 4.7, GCC defines __cplusplus to the standard value, even in -std=gnu++98 and -std=gnu++11 modes. Is there any objection to applying the same change to Clang?
> No objections off-hand, but I wouldn't be surprised if this causes issues with the C headers on a number of systems. Let's try it and evaluate the fallout.

For many years, it was solaris in particular which was holding up GCC 
defining the correct value for __cplusplus. This has been fixed in gcc 
by adding a bunch of 'fix includes'. I don't know exactly what the 
issues were, or how much clang cares about solaris, but that is probably 
the best place to check issues.


> 	- Doug
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

More information about the cfe-dev mailing list