Andrew Haley wrote:
x z wrote:

I would like to see that GCC define a macro in the case it is being
used to compile a program. Currently there is a __GNUC__ macro
defined by the GNU C preprocessor CPP.  That does not suit the need.
As the CPP Manual says: __GNUC__ is "defined by all GNU compilers
that use the C preprocessor".  It seems to imply that any (non-GNU)
compiler that uses the GNU C preprocessor would also have __GNUC__
defined.  According to their respective manuals, Intel C++ Compiler
and Portable C Compiler also pre-define __GNUC__, possibly because
they use the GNU CPP.

They don't use GNU CPP.

Therefore, the fact that __GNUC__ is defined does not necessarily
mean the GCC compiler proper is being used.

I don't think you've thought about this thoroughly.

Any compiler that is not GNU C but defines __GNUC__ is lying to its
users.  If we define __REAL_GNUC__ they'll just define that as well.

Perhaps we could trademark _REAL_HONEST_GNU_CC_ and then sue anyone
who used the trademark (since this would pretty clearly be a case
of trademark dilution I would think!) After all you can't put GUCCI
on your knock off shoe designs :-)

Andrew.

Reply via email to