🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #701

Whitespace before preprocessor directive

#701
From: Norman Diamond
Date: Fri, 29 Sep 1989 02:18
17 lines
1211 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 Corporation (diamond@ws.sony.junet)
  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: <10889@riks.csl.sony.co.jp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!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!tut.cis.ohio-state.edu!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: Whitespace before preprocessor directive
Message-ID: <10889@riks.csl.sony.co.jp>
Date: 29 Sep 89 02:18:08 GMT
Reply-To: diamond@ws.sony.junet (Norman Diamond)
Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan
Lines: 17