[LLVMdev] Why __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ are defined as 4, 2, 1 in clang?

Joerg Sonnenberger joerg at britannica.bec.de
Sat Feb 19 20:55:19 PST 2011


On Sat, Feb 19, 2011 at 08:28:45PM -0800, Yuri wrote:
> clang isn't GNU C. So why does it define such values and why they are 4,2,1?
> It also defines __GNUC_STDC_INLINE__=1 for some reason.

It is mostly compatible with GCC 4.2 and providing the macros makes a
lot of code work without modifications. __GNUC_STDC_INLINE__ depends on
the choosen level of standard compliance. The (current?) behavior again
mimics GCC 4.2.1.

Joerg



More information about the llvm-dev mailing list