Path: utzoo!dciem!array!colin From: colin@array.UUCP (Colin Plumb) Newsgroups: comp.lang.c Subject: Re: CPP bug in sun OS cc?? (or ANSI standard interpretation??) Message-ID: <384@array.UUCP> Date: 2 Aug 90 04:19:31 GMT References: <1579@idunno.Princeton.EDU> Organization: Array Systems Computing, Inc., Toronto, Ontario, CANADA Lines: 22 In article <1579@idunno.Princeton.EDU> rhl@grendel.Princeton.EDU (Robert Lupton (the Good)) writes: > The following fails to compile on a sparc running Sun O/S 4.0.3: > #define line LINE > > main() > { > #line 1234 "junk.c" > } > as the "#line" is treated as "#LINE" -- does ansi allow this?? Section 3.8.3 Macro Replacement Semantics, paragraph 2: If a # preprocessing token, followed by an identifier, occurs lexically at the point at which a preprocessing directive could begin, the identifier is not subject to macro replacement. This is from the December 7, 1988 draft. Looks like it's illegal. -- -Colin