x z <[EMAIL PROTECTED]> writes:

> I think an important point was missed in the discussion.  Some seem
> to focus on the dishonest definition of __GNUC__ by non-GNU C
> compilers.  That was not my point.  My point is that if __GNUC__ is
> defined by CPP, not the GNU C compiler proper, (and this seems to be
> supported by the CPP Manual,) and any (non-GNU) C compiler can use
> CPP, then those non-GNU C compilers would "inadverdently" define
> __GNUC__ and lead people to believe that they are GNU C.  That is
> why I think the GNU C compiler should define a macro independently
> from CPP.  Or, alternatively, __GNUC__ should be defined by the GCC
> compiler proper, not CPP.

I very much doubt that any compiler other than gcc uses the gcc
preprocessor.

In any case, the documentation has in some sense misled you.  __GNUC__
is indeed defined by the compiler proper, not by the preprocessor.
But that in turn does not matter, as if any non-gcc compiler *did* use
the gcc preprocessor, it would do so via gcc -E.  In gcc, the
preprocessor is not a separate program.  Using gcc -E would define
__GNUC__ as indeed it should.  So there is really no escape.

One can only hope that, in the unlikely event that some other compiler
uses the gcc preprocessor, it passes the -undef option to turn off the
macros defined by the compiler proper.

Ian

Reply via email to