Article View: comp.std.c
Article #4153Re: sizeof != identifier
From: Clive D.W. Feather
Date: Sun, 01 Oct 1995 21:00
Date: Sun, 01 Oct 1995 21:00
29 lines
1835 bytes
1835 bytes
In article <44mk1m$jop@newshost.lanl.gov>, Tanmoy Bhattacharya <tanmoy@qcd.lanl.gov> wrote: >In article <DANIELV.95Oct1122701@crt0.crt>, danielv@crt0.crt (Daniel >Villeneuve) writes: >|> As I'm reading the lexical rules of the standard, it appears to me that, as >|> early as translation phase 3, the file is decomposed into a stream of >|> preprocessing tokens and the `sizeof' string is then converted into the >|> `operator' token as listed in section 3.1.5. I misread this before, and I apologise. There is indeed a problem. > I guess everything hold together if one assumes that the `sizeof' in the > definition of operator is the result of reduction of `sizeof' keyword token, > and not the sequence of source code characters `s' `i' .. `f'. No, I think this is stretching it too far, though it points at a sensible way to correct the defect. > Where in the standard does it specify this? In fact, where does the standard > state which pp-token becomes which token? With this exception, there is only one token that a given pp-token can be converted to, though of course that token sometimes occurs in more than one place within 6.1. This could all do with tidying up. -- Clive D.W. Feather | If you lie to the compiler, clive@demon.net (work, preferred) | it will get its revenge. clive@stdc.demon.co.uk (home) | - Henry Spencer
Technical Details
Message-ID:
<DFsFpA.120@stdc.demon.co.uk>Path:
arc1-ca.pugleaf.net!stdc.demon.co.uk!cliveReferences:
<DANIELV.95Oct1122701@crt0.crt> <44mk1m$jop@newshost.lanl.gov>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!stdc.demon.co.uk!clive From: clive@stdc.demon.co.uk (Clive D.W. Feather) Newsgroups: comp.std.c Subject: Re: sizeof != identifier Date: Sun, 1 Oct 1995 21:00:44 GMT Organization: Demon Internet Limited (personal account) Message-ID: <DFsFpA.120@stdc.demon.co.uk> References: <DANIELV.95Oct1122701@crt0.crt> <44mk1m$jop@newshost.lanl.gov> Reply-To: clive@demon.net X-NNTP-Posting-Host: stdc.demon.co.uk