Non-compiled source text?

Stephen Clamage steve at taumet.com
Sun Dec 16 07:23:34 AEST 1990


minow at mountn.dec.com (Martin Minow) writes:

>A compiler I occassionally use rejected the following source text:

>	#if 0
>	    this doesn't work
>	#endif

>complaining of an unterminated character constant.  My reading of the ANSI
>standard would permit this (and the compilers I generally use have no
>trouble with it).

Read the standard again.  In section 3.8 and 3.8.1 it is made explicit
that #ifdef and #ifndef must be followed by an identifier and then a
newline (other white space excepted).  "#if 0" is a syntax error.
-- 

Steve Clamage, TauMetric Corp, steve at taumet.com



More information about the Comp.lang.c mailing list