🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #944

Re: Macro names imbedded in pp-numbers [repost]

#944
From: Walter Murray
Date: Fri, 17 Nov 1989 17:38
19 lines
1272 bytes
Norman Diamond writes:

> Both the standard and the rationale say that in the pp-number
>   0x7e-getchar()
> it is illegal for my preprocessor to expand the getchar() macro.
> If there is a real getchar() function, it is guaranteed that the
> real function must be invoked by this expression.

Isn't this overlooking the constraint in 3.1?  As I read it,
<0x7e-getchar> is a pp-number.  In translation phase 7, the
translator attempts to convert each preprocessing token into
a token.  At that point, each preprocessing token must have
the form of a keyword, an identifier, a constant, a string
literal, an operator, or a punctuator.  Because <0x7e-getchar>
doesn't match any of these, the constraint is violated, the program
is illegal, and a diagnostic must be produced.

Walter Murray
---
Technical Details
Message-ID: <12570031@hpclwjm.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!uw-beaver!Teknowledge.COM!unix!hplabs!hp-ses!hpcuhb!hpcllla!hpclisp!hpclwjm!walter
References: <11134@riks.csl.sony.co.jp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!uw-beaver!Teknowledge.COM!unix!hplabs!hp-ses!hpcuhb!hpcllla!hpclisp!hpclwjm!walter
From: walter@hpclwjm.HP.COM (Walter Murray)
Newsgroups: comp.std.c
Subject: Re: Macro names imbedded in pp-numbers [repost]
Message-ID: <12570031@hpclwjm.HP.COM>
Date: 17 Nov 89 17:38:22 GMT
References: <11134@riks.csl.sony.co.jp>
Organization: Hewlett-Packard Calif. Language Lab
Lines: 19