[cfe-dev] GNU Macros

Rafael Espíndola rafael.espindola at gmail.com
Fri Aug 23 13:22:39 PDT 2013


Many project (including system headers) check for __GNU__ for things
like "supports __attribute__", so I don't think we can drop them by
default any time soon.

On 23 August 2013 14:36, Jean-David Gadina <macmade at xs-labs.com> wrote:
> Hi list,
>
> I was wondering if there’s any plan and/or discussions about removing by default the GNU feature-check macros definitions (like __GNUC__ & co).
> I’m sorry if this has been already asked or discussed.
>
> I understand that compatibility with GCC was an important factor of Clang adoption, and I know I can undefine those macros on the command line.
> But is such a compatibility level still needed now, and should it be enabled by default?
> What about a specific flag to enable the GNU macros (something like —gnu or --with-gnu-defines), so they can be turned off by default?
> Or maybe simply having -std=gnu99 defining this, so we could use -std=c99 to have them turned off.
>
> Thanks for any feedback about this,
> Have a great day,
>
> --
> Jean-David Gadina (@macmade)
> www.xs-labs.com
>
>
> _______________________________________________
> 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