Article View: comp.std.c
Article #133Re: preprocessing subterfuge
From: Clive Feather
Date: Mon, 10 Aug 1992 13:59
Date: Mon, 10 Aug 1992 13:59
21 lines
1202 bytes
1202 bytes
In article <1992Aug7.001510.13418@mri.com> woolsey@mri.com (Jeff Woolsey) writes:
> Basically, is the following module legal?
> #define it 1,2
> #define that(a,b) a+b
> void f(void) {
> that(it);
> }
> I've been reading the standard all afternoon looking for supporting
> evidence one way or the other on this one, and have been unable to
> convince myself of the disposition of this code fragment (reading the
> standard is usually like this, but eventually something falls out
> and settles it).
Section 6.8.3 Constraints is perfectly clear - the number of arguments
must match the #define.
--
Clive D.W. Feather | IXI Limited | If you lie to the compiler,
clive@x.co.uk | 62-74 Burleigh St. | it will get its revenge.
Phone: +44 223 462 131 | Cambridge CB1 1OJ | - Henry Spencer
Fax: +44 223 462 132 | United Kingdom |
Technical Details
Message-ID:
<1992Aug10.135900.7871@x.co.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!acorn!ixi!cliveReferences:
<1992Aug7.001510.13418@mri.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!acorn!ixi!clive From: clive@x.co.uk (Clive Feather) Newsgroups: comp.std.c Subject: Re: preprocessing subterfuge Message-ID: <1992Aug10.135900.7871@x.co.uk> Date: 10 Aug 92 13:59:00 GMT References: <1992Aug7.001510.13418@mri.com> Organization: IXI Limited, Cambridge, UK Lines: 21