Path: utzoo!utgpu!watmath!clyde!att!rutgers!cmcl2!phri!marob!daveh From: daveh@marob.MASA.COM (Dave Hammond) Newsgroups: comp.lang.c Subject: Re: how widespread is this cpp bug? Keywords: cpp whitespace bug Message-ID: <408@marob.MASA.COM> Date: 2 Dec 88 12:43:46 GMT References: <49179@pyramid.pyramid.com> Reply-To: daveh@marob.masa.com (Dave Hammond) Organization: ESCC New York City Lines: 38 In article <49179@pyramid.pyramid.com> markhall@pyramid.UUCP (Mark Hall) writes: >The following code compiles and runs on pyramid, att-3b2, and sun3: > > #include> main() > { > prin/* comment in the middle */tf ( "Hello World.\n" ); > } > >But, according to K&R pg. 179: > > ``... comments [...] as described below > are ignored except as they serve to separate tokens.'' > >So the above program is actually in error, as `prin' and `tf' should >Does your cpp have this `feature'? On Xenix 386 (SCO 2.3.1), cpp gets it right: ------------------------------ snip snip ------------------------------ #include main(argc, argv) int argc; char *argv[]; { prin/*comment*/tf ("hello, world\n"); } ------------------------------ snip snip ------------------------------ $ cc foo.c foo.c foo.c(7) : error 65: 'prin' : undefined foo.c(7) : error 61: syntax error : identifier 'tf' $ -- Dave Hammond ...!uunet!masa.com!{marob,dsix2}!daveh