This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to distinguish MYDEF and MYDEF() with #ifdef
- From: John Love-Jensen <eljay at adobe dot com>
- To: Wesley Smith <wesley dot hoke at gmail dot com>
- Cc: Frank Winklmeier <frank dot winklmeier at cern dot ch>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Tue, 24 Jul 2007 08:59:40 -0500
- Subject: 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