warning: '/*' within comment

Lars Henrik Mathiesen thorinn at skinfaxe.diku.dk
Wed Jun 13 08:27:45 AEST 1990


diamond at tkou02.enet.dec.com (diamond at tkovoa) points out that I gave a
bad counterexample, so I'll try again.

If you know of an ANSI C compiler (I don't think it's ``perfectly
valid'' otherwise) which does not lex #if'fed-out blocks into
pptokens, please explain how it handles this conformant (I think)
program:
#include <stdio.h>
#if 0
I'll put a /* inside 's
#endif
#if 1
Now it's a */. This program doesn't use comments.
#else
int main(int c, char *v[]) { printf("Hello, world!\n"); return 0; }
#endif

--
Lars Mathiesen, DIKU, U of Copenhagen, Denmark      [uunet!]mcsun!diku!thorinn
Institute of Datalogy -- we're scientists, not engineers.      thorinn at diku.dk



More information about the Comp.std.c mailing list