Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.lang.c Subject: Re: CPP bug in sun OS cc?? (or ANSI standard interpretation??) Message-ID: <372@taumet.com> Date: 2 Aug 90 16:00:46 GMT References: <1579@idunno.Princeton.EDU> Organization: Taumetric Corporation, San Diego Lines: 18 rhl@grendel.Princeton.EDU (Robert Lupton (the Good)) writes: !#define line LINE !main() !{ !#line 1234 "junk.c" !} !as the "#line" is treated as "#LINE" -- does ansi allow this?? ANSI C standard section 3.8.3: "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." In other words, the compiler does not conform to the ANSI standard. -- Steve Clamage, TauMetric Corp, steve@taumet.com