This is the mail archive of the gcc-patches@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]

Re: cpplib: new lexer


Zack Weinberg <zack@wolery.cumb.org> writes:

> I believe it's purely historical; -D does that because that's what -D
> has always done.  There is a justification, though.  Macros defined on
> the command line with no expansion are usually meant to be tested in
> conditionals, and if you define them to 1 instead of empty, you can test
> them with #if as well as #ifdef.  (Of course you can use #if defined,
> but that's more typing.)

Note that the autoconf manual now uniformly uses #if instead of #ifdef, so
if one uses the old-style autoconf results handling (command-line -D
switches rather than a config.h file), proper compilation depends on this.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

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