🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2368

Re: comment style

#2368
From: Steven King
Date: Mon, 14 Jan 1991 03:04
32 lines
1568 bytes
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...
Technical Details
Message-ID: <1991Jan14.030452.12893@nowhere.uucp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!ut-emx!nowhere!sking
References: <29161:Jan903:10:3391@kramden.acf.nyu.edu> <thorinn.663630754@ragnarok.diku.dk> <551@taumet.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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> <thorinn.663630754@ragnarok.diku.dk> <551@taumet.com>
Organization: Anarchists Union
Lines: 32