Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!BRL.MIL!phil From: phil@BRL.MIL (Phil Dykstra) Newsgroups: comp.sys.sgi Subject: Re: Fortran bug? Message-ID: <8912041433.aa29614@SPARK.BRL.MIL> Date: 4 Dec 89 19:33:54 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 23 > K&R state that blank, tab, nl and comments are treated > collectively as "white space" character. (K&R 1978, p.179) Sure enough, I just looked and both the original and 2nd edition state this. However, the early Unix C compilers (and even most current ones) would replace comments by nothing at all rather than by a space [to be precise, the C preprocessor would do this]. This behavior was/is often exploited for token concatenation. ANSI adopted the original spec that comment = whitespace and thus provided the new '##' operator for concatenation. Note that one of the actions of the GNU C compiler "-traditional" flag is to: * In the preprocessor, comments convert to nothing at all, rather than to a space. This allows traditional token concatenation. So, SGI is just following the convention that most UNIX C compilers do. Strict ANSI compilers however will not do this. - Phil