This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: new lexer
Zack Weinberg <zack@wolery.cumb.org> writes:
> On Wed, Apr 26, 2000 at 04:37:24PM -0700, Russ Allbery wrote:
>> 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.
> I have absolutely no intention of changing this.
Whoops, sorry, I didn't mean to imply that I thought you might have. I
was just adding some additional context I had noticed a while back.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>