🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #623

Re: Question about ANSI preprocessor

#623
From: david.f.prosser
Date: Thu, 28 Sep 1989 14:16
20 lines
1020 bytes
In article <10879@riks.csl.sony.co.jp> diamond@ws.sony.junet (Norman Diamond) writes:
>According to the ANSI standard, does the following code cause
>expansion of the preprocessor macro "huh"?
>
>#define huh(x) (abc + (x))
>y = huh
>#if 0
>	, a, lot, of, garbage
>#endif
>(z);

The invocation of a function-like macro requires that the next
preprocessing token after the macro name be the (.  Thus the
above example must produce the equivalent of

	y = huh (z);

after preprocessing.

Dave Prosser	...not an official X3J11 answer...
Technical Details
Message-ID: <2034@cbnewsl.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!ctrsol!cica!iuvax!rutgers!dptg!att!cbnewsl!dfp
References: <10879@riks.csl.sony.co.jp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!ctrsol!cica!iuvax!rutgers!dptg!att!cbnewsl!dfp
From: dfp@cbnewsl.ATT.COM (david.f.prosser)
Newsgroups: comp.std.c
Subject: Re: Question about ANSI preprocessor
Message-ID: <2034@cbnewsl.ATT.COM>
Date: 28 Sep 89 14:16:09 GMT
References: <10879@riks.csl.sony.co.jp>
Reply-To: dfp@cbnewsl.ATT.COM (david.f.prosser)
Organization: AT&T Bell Laboratories
Lines: 20