Article View: comp.std.c
Article #1412Re: warning: '/*' within comment
From: Sean Fagan
Date: Fri, 08 Jun 1990 17:25
Date: Fri, 08 Jun 1990 17:25
32 lines
1793 bytes
1793 bytes
In article <371@necssd.NEC.COM> harrison@necssd.NEC.COM (Mark Harrison) writes: >Are you sure about this? I tried your example, and it both compiled and >linted. If this is true, then the following should also not work: >#if MICROSOFT >extern far char * x; /* however it's done */ >#endif >#if VMS >extern char * x$something; /* however it's done */ >#endif This lexes just fine. For most purposes, all we care about is the preprocessor (or, if it's built into the compiler, the preprocessing stage). Since you say you ran lint, I suspect you were on a traditional unix box, and /lib/cpp was used. /lib/cpp is notorious for being easy. If neither MICROSOFT nor VMS is defined, then the compiler will never see them, and, therefore, it can't care. If, however, you were to use a compiler with a built-in preprocessor, then it might not work. (uSoft C accepts it, I suspect because it considers $ a valid lexable character [support for other languages, I suspect].) Remember that no semantic analysis is being done. -- -----------------+ Sean Eric Fagan | "It's a pity the universe doesn't use [a] segmented seanf@sco.COM | architecture with a protected mode." uunet!sco!seanf | -- Rich Cook, _Wizard's Bane_ (408) 458-1422 | Any opinions expressed are my own, not my employers'.
Technical Details
Message-ID:
<6568@scolex.sco.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!sco!seanfReferences:
<1990Jun1.200433.6919@druid.uucp> <AaOZGd_00as98coVU9@andrew.cmu.edu> <16786@haddock.ima.isc.com> <371@necssd.NEC.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!sco!seanf From: seanf@sco.COM (Sean Fagan) Newsgroups: comp.std.c Subject: Re: warning: '/*' within comment Message-ID: <6568@scolex.sco.COM> Date: 8 Jun 90 17:25:00 GMT References: <1990Jun1.200433.6919@druid.uucp> <AaOZGd_00as98coVU9@andrew.cmu.edu> <16786@haddock.ima.isc.com> <371@necssd.NEC.COM> Sender: news@sco.COM Reply-To: seanf@sco.COM (Sean Fagan) Organization: The Santa Cruz Operation, Inc. Lines: 32