CPP bug in sun OS cc?? (or ANSI standard interpretation??)

Stephen Clamage steve at taumet.com
Fri Aug 3 02:00:46 AEST 1990


rhl at 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 at taumet.com



More information about the Comp.lang.c mailing list