🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #702

Macro-created # directives

#702
From: Norman Diamond
Date: Fri, 29 Sep 1989 07:22
21 lines
1133 bytes
Consider the following sample program:

  #define junk #include <garbage.h>
  junk

Does my preprocessor have to include <garbage.h>?


Note that this is different from the situation mentioned in the
standard.  For the following sample program:

  #define junk2(arg) arg
  junk2(#include <garbage.h>)

the standard says that the behavior is undefined.

-- 
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: <10891@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: Macro-created # directives
Message-ID: <10891@riks.csl.sony.co.jp>
Date: 29 Sep 89 07:22:01 GMT
Reply-To: diamond@ws.sony.junet (Norman Diamond)
Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan
Lines: 21