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: How to distinguish MYDEF and MYDEF() with #ifdef


Hi Wes,

> Or why not...

Nope, doesn't work.

_OLD_MYDEF (which is a reserved identifier... better to use OLD_MYDEF_) does
not get the value held by MYDEF, rather _OLD_MYDEF gets the value MYDEF
itself, which is then later expanded at the point of use based on what the
value MYDEF holds at that time.

I hate the preprocessor.  (One of the points in favor of Java and D
Programming Language, in my opinion.)

--Eljay


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