Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!swrinde!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.UUCP (Conor P. Cahill) Newsgroups: comp.lang.c Subject: Re: #endif ??? Message-ID: <1228@virtech.UUCP> Date: 4 Oct 89 23:09:48 GMT References: Distribution: comp Organization: Virtual Technologies Inc Lines: 22 In article , jfr@tel3.tel3.tel.vtt.fi (Jim Reilly) writes: > it has the following definition for sparc. 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. The data to the right of the #else, #endif, etc used to be ignored, but this was deemed to be unacceptable for certain compiler environments. It is a no no, but most compilers just compain about it with a warning, but compile anyway. There was never any real use of this data, it was just a comment that was allowed to exist without the /* */. The safe way to do this is to always use the /* label */ which will work in either of the environments. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+