🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #748

Re: Preprocessor numbers

#748
From: Doug Gwyn
Date: Sat, 14 Oct 1989 04:23
11 lines
1052 bytes
In article <10892@riks.csl.sony.co.jp> diamond%ws.sony.junet@uunet.uu.net (Norman Diamond) writes:
>In evaluating the constant-expression of a #if directive, any
>identifiers that are left over after macro substitution are changed
>into the constant 0.  What about preprocessor numbers that are left
>over after numeric conversion?  For example, 1f0x3 does not convert
>into a long or double.  Should it be replaced by the constant 0?

No, when that pp-number pp-token is converted to a non-pp token before
evaluation of the #if's constant-expression according to the rules of
section 3.4, the resulting "token" will be diagnosed as an invalid C
token.
Technical Details
Message-ID: <11283@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!smoke!gwyn
References: <10892@riks.csl.sony.co.jp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Preprocessor numbers
Message-ID: <11283@smoke.BRL.MIL>
Date: 14 Oct 89 04:23:04 GMT
References: <10892@riks.csl.sony.co.jp>
Reply-To: gwyn@brl.arpa (Doug Gwyn)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 11