This one bit me today

Bob Goudreau goudreau at dg-rtp.dg.com
Thu Oct 19 07:07:34 AEST 1989


In article <255 at bbxsda.UUCP> scott at bbxsda.UUCP (Scott Amspoker) writes:
>In article <1901 at xyzzy.UUCP> goudreau at rtp48.dg.com (Bob Goudreau) writes:
> >In article <244 at bbxsda.UUCP> scott at bbxsda.UUCP (Scott Amspoker) writes:
> >>
> >>Another easy pitfall in C is forgetting to close a comment.  On compilers
> >>that don't nest comments this will cause some code to be swallowed up
> >
> >Any compiler that allows nesting of comments isn't a C compiler anyway,
> >by either K&R or ANSI standards.
>
>Believe it or not - that is a command line switch on some C compilers.

My point was that any such compilers (or compiler-instantiations created
by invoking the same program with different switches) may *claim* to be
C compilers, but claiming isn't enough.  Such compilers are *broken*, at
least as C compilers.  Now if they advertised themselves as compilers
for a language that's sort of like (but not really) C, then that's
another story.  But if they're going to monkey with fundamental parts
of the language definition (and yes, the language definition includes
preprocessor directives) in their compiler, who's to say what else
they'll break?

-----------------------------------------
Bob Goudreau				+1 919 248 6231
Data General Corporation		...!mcnc!rti!xyzzy!goudreau
62 Alexander Drive			goudreau at dg-rtp.dg.com
Research Triangle Park, NC  27709, USA



More information about the Comp.lang.c mailing list