This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: stupid C preprocessor question
- From: Zack Weinberg <zack at codesourcery dot com>
- To: "Steven G. Kargl" <kargl at troutmask dot apl dot washington dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 23 Mar 2004 21:57:01 -0800
- Subject: Re: stupid C preprocessor question
- References: <200403240537.i2O5bN5A033694@troutmask.apl.washington.edu>
"Steven G. Kargl" <kargl@troutmask.apl.washington.edu> writes:
> I learned K&R C several years ago and now have a need
> to return to programming in C. Is the following legal C?
The only bit of your code that is objectionable is this bit
> #if 0
> Can't do this
> #endif
which provokes undefined behavior, because of the unmatched single
quote. Use a real comment (/* Can't do this */) instead.
zw