🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #706

Preprocessor directive & whitespace

#706
From: Norman Diamond
Date: Wed, 11 Oct 1989 08:03
17 lines
1201 bytes
Consider the following fragment of code:

  x = y + z;  /* comment
  more comment */  #define a b

Is this a legal #define?  I think no, because the comment is replaced
by a single space, so the "#" is preceded by more than whitespace --
it is preceded by "x = y + z;" on the same line.

If my processor encounters and obeys such an illegal #define, is it
required to produce a warning message, or may it obey silently?

-- 
Norman Diamond, Sony Corp. (diamond%ws.sony.junet@uunet.uu.net seems to work)
  The above opinions are inherited by your machine's init process (pid 1),
  after being disowned and orphaned.  However, if you see this at Waterloo or
  Anterior, then their administrators must have approved of these opinions.
Technical Details
Message-ID: <10956@riks.csl.sony.co.jp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond
From: diamond@csl.sony.co.jp (Norman Diamond)
Newsgroups: comp.std.c
Subject: Preprocessor directive & whitespace
Message-ID: <10956@riks.csl.sony.co.jp>
Date: 11 Oct 89 08:03:24 GMT
Reply-To: diamond@ (Norman Diamond)
Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan
Lines: 17