This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: stupid C preprocessor question


"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


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