[comp.std.c] Preprocessor numbers

diamond@csl.sony.co.jp (Norman Diamond) (09/29/89)

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?

-- 
Norman Diamond, Sony Corp. (diamond%ws.sony.junet@uunet.uu.net seems to work)
  The above opinions are inherited by your machine's init process (pid 1),
  after being disowned and orphaned.  However, if you see this at Waterloo or
  Anterior, then their administrators must have approved of these opinions.

gwyn@smoke.BRL.MIL (Doug Gwyn) (10/14/89)

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.