Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!munnari.oz.au!cs.mu.oz.au!ok From: ok@cs.mu.oz.au (Richard O'Keefe) Newsgroups: comp.lang.c Subject: Re: This one bit me today Message-ID: <2399@munnari.oz.au> Date: 12 Oct 89 03:32:41 GMT References: <2432@hub.UUCP> <568@sppy00.UUCP> <750@philmtl.philips.ca> <267@wsl.UUCP> Sender: news@cs.mu.oz.au Lines: 20 In article <267@wsl.UUCP>, john@wsl.UUCP (John Allen on wsl) writes: > The /* construct for start of comment is not in the 'C' compiler but in the > preprocessor. Historically this is not true. The PDP-11 C compilers didn't even *run* the preprocessor unless the very first character of the file was a '#'. I have seen the sources of the UNIX V7 C compiler for PDP-11s, and I can assure you that the tokeniser did most definitely handle comments. To this day, /lib/cpp (if you have it) usually includes an option -C, which causes comments in the input to be preserved in the output, and many UNIX C compilers will accept foobaz.c - DO use the preprocessor foobaz.i - DON'T use the preprocessor I just double-checked this on a Sun-3/50 running SunOS 4.0_Export, and when that C compiler is given a *.i file it _does_ accept comments but it _doesn't_ accept #define, so PCC at least still handles comments in the compiler. It wasn't true in the Snyder compiler for DEC-10s either, where the preprocessor was part of the compiler, not a separate program.