Path: utzoo!attcan!uunet!cs.utexas.edu!ut-emx!nowhere!sking From: sking@nowhere.uucp (Steven King) Newsgroups: comp.std.c Subject: Re: comment style Message-ID: <1991Jan14.030452.12893@nowhere.uucp> Date: 14 Jan 91 03:04:52 GMT References: <29161:Jan903:10:3391@kramden.acf.nyu.edu> <551@taumet.com> Organization: Anarchists Union Lines: 32 In article <551@taumet.com> steve@taumet.com (Stephen Clamage) writes: >NOTE: Not all existing preprocessors treat // comments the same way. >What I have stated above is as specified in the latest documentation >for C++. Some existing (older) C++ compilers behave differently. >For C, // comments are an extension, not part of any standard, so who >knows what different compilers will do? >-- Microsoft C, surprisingly enough, handles this correctly, while pcc's cpp ignores the // so that #define RDR 1 // reader x = y[RDR] ; is expanded to x = y[1 // reader] resulting in a very frustrating source of error messages from cfront. This is a problem with most implementations of cfront that dont supply their own cpp and even with a few that do. ( the LPI c compiler, which claims to be ANSI, ignores _//_, and barfs at things like _#ident_ and most everything else ) -- ..!cs.utexas.edu!ut-emx!nowhere!sking been dazed and confused for so long its true; wanted an OS, never bargined for you. Lotsa people hacking, few of them know, kernal of unix was created below...