🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4156

Re: sizeof != identifier

#4156
From: Daniel Villeneuve
Date: Mon, 02 Oct 1995 12:03
20 lines
1373 bytes
In article <DFs6Io.HB@stdc.demon.co.uk> clive@stdc.demon.co.uk (Clive D.W. Feather) writes:
> From: clive@stdc.demon.co.uk (Clive D.W. Feather)
> Daniel Villeneuve <danielv@crt0.crt> wrote:
> > 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.
> 
> You are confusing tokens and preprocessing tokens.

In section 3.1 (Lexical Elements), preprocessing tokens _include_ operator
and punctuator, and in section 3.1.5 (Operators), there is no reference on
translation phase-dependant behavior.

Preprocessing tokens are converted to tokens in translation phase 7, so the
problem is: is `sizeof' considered an identifier or an operator as a
preprocessing token?

--Daniel
Technical Details
Message-ID: <DANIELV.95Oct2080345@crt0.crt>
Path: arc1-ca.pugleaf.net!CC.UMontreal.CA!news
References: <DANIELV.95Oct1122701@crt0.crt> <DFs6Io.HB@stdc.demon.co.uk>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!CC.UMontreal.CA!news
From: danielv@crt0.crt (Daniel Villeneuve)
Subject: Re: sizeof != identifier
In-Reply-To: clive@stdc.demon.co.uk's message of Sun, 1 Oct 1995 17:42:23 GMT
Message-ID: <DANIELV.95Oct2080345@crt0.crt>
Sender: news@cc.umontreal.ca (Administration de Cnews)
Organization: Universite de Montreal
References: <DANIELV.95Oct1122701@crt0.crt> <DFs6Io.HB@stdc.demon.co.uk>
Date: Mon, 2 Oct 1995 12:03:45 GMT