[cfe-dev] GNU Macros

Jean-David Gadina macmade at xs-labs.com
Fri Aug 23 11:36:37 PDT 2013


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





More information about the cfe-dev mailing list