This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: stupid C preprocessor question
- From: Robert Dewar <dewar at gnat dot com>
- To: "Steven G. Kargl" <kargl at troutmask dot apl dot washington dot edu>
- Cc: Zack Weinberg <zack at codesourcery dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 24 Mar 2004 03:17:51 -0500
- Subject: Re: stupid C preprocessor question
- References: <200403240605.i2O65fE0033863@troutmask.apl.washington.edu>
Steven G. Kargl wrote:
I don't have access to
the C99 standard, but Harbison and Steele state in a discussion
of #if ... #endif constructs that "A group of lines that is
discarded is not processed by the preprocessor." (H&S, 5th ed.
page 62).
This is just plain wrong, or rather casually careless.
It appears that gcc is preprocessing the discarded lines.
The lines discarded still have to be valid sequences of tokens.