constant expressions

Ron Guilmette rfg at NCD.COM
Wed Aug 15 16:38:29 AEST 1990


In article <1916 at tkou02.enet.dec.com> diamond at tkou02.enet.dec.com (diamond at tkovoa) writes:
>In article <5930 at darkstar.ucsc.edu> daniel at terra.ucsc.edu () writes:
>
>>Should a translator identify 1-1 as ``a constant expression evaluating
>>to zero,'' (even absent optimization)?
>
>I have added comp.std.c to the distribution for this article, because
>the C standard is almost vague on this as well.  If C++ maintains
>compatibility with C here, then my best guess is:
>  A translator does not have to compute the constant expression...

Neither the C standard nor E&S are vague about this at all.  Clearly,
1-1 is "a constant expression evaluating to zero".
-- 

// Ron Guilmette  -  C++ Entomologist
// Internet: rfg at ncd.com      uucp: ...uunet!lupine!rfg
// Motto:  If it sticks, force it.  If it breaks, it needed replacing anyway.



More information about the Comp.std.c mailing list