This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc compiler dependency generation


Hi Naum,

Try this:  modify your statement:

#if defined(NAME) && defined(XXX) && (NAME == XXX)
#include "include_file.h"
#endif

If you are wondering what is going on in your #if test, maybe this will
help, from the C preprocessor document:

"Identifiers that are not macros, are treated as zero."

So your test...

#if (NAME == XXX)

...looks like this if NAME and XXX are not defined, or one or the other or
both are defined to be 0...

#if (0 == 0)

HTH,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]