stupid C preprocessor question
Zack Weinberg
zack@codesourcery.com
Wed Mar 24 16:28:00 GMT 2004
"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
More information about the Gcc
mailing list