🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #995

How does the rescan work for macro expansion result?

#995
From: Shin-Ming Liu
Date: Thu, 23 Nov 1989 00:23
18 lines
996 bytes
I have one question regarding the rescan for macro expansion in draft
ANSI standard.  Let's see the example first.  What do you think the
result from preprocessor should be ?

#define abc xyz
#define echo(a) a

echo(a)bc

Should the result be "xyz", "a2", or "a 2"?  If the result is "xyz",
why do we need ## operator anyway?  If the result is "a2", it seems
violate the rule specified in 3.8.3.4.  If the result is "a 2", where
does the draft state it?  Pleas comment.

If it has been discussed before, would someone mail me what the consensus
is.

--
Technical Details
Message-ID: <31926@batman.mips.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!mips!shin

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!mips!shin
From: shin@mips.COM (Shin-Ming Liu)
Newsgroups: comp.std.c
Subject: How does the rescan work for macro expansion result?
Keywords: macro
Message-ID: <31926@batman.mips.COM>
Date: 23 Nov 89 00:23:26 GMT
Reply-To: shin@mips.COM (Shin-Ming Liu)
Distribution: usa
Organization: MIPS Computer Systems, Sunnyvale, CA
Lines: 17