Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!ucbvax!agate!shelby!decwrl!shlump.nac.dec.com!shodha.dec.com!devine From: devine@shodha.dec.com (Bob Devine) Newsgroups: comp.lang.c Subject: Re: #endif ??? Message-ID: <438@shodha.dec.com> Date: 4 Oct 89 15:32:50 GMT References: Distribution: comp Organization: Digital Equipment Corp. - Colorado Springs, CO. Lines: 18 In article , jfr@tel3.tel3.tel.vtt.fi (Jim Reilly) writes: > The `#endif sparc` > never caused any complaints on the sun's normal C compiler, but our > 'Designer C++' compiler doesn't like it. Is this just something > funny with the c compilers on the SUN ? At least I didn't find > it in any C or ANSI C manuals around here. > > #ifdef sparc > .... other stuff deleted .... > #endif sparc The ANSI C spec forbids the placing of anything except a comment after the `#endif' (section 3.8.1). Ditto for `#else'. The acceptance of a token after the cpp directives was never consistently followed. Some compilers took them, others didn't. I've seen programs that had it both ways. Bob Devine