Re: value of the constant expression 1<<(1?1:1) < 0x9999
- From: Francois Grieu <fgrieu@xxxxxxxxx>
- Date: Tue, 29 Apr 2008 21:00:21 -0700 (PDT)
I am as tired as my cimpiler. Should have said
one of my C compiler (Keil C51) evaluates the constant expression
1<<(1?1:1) < 0x9999
to the value 0.
Thje rest was hopefully correct.
Francois Grieu
.
Relevant Pages
- Re: value of the constant expression 1<<(1?1:1) < 0x9999
... one of my C compiler (Keil C51) evaluates the constant expression ... unsigned char bug4_a ... (comp.lang.c) - Re: float.h and math.h
... The hex floats are "new" in C99 aren't they..... ... That's because it's not a constant expression. ... And as GCC 331 is still C89 I guess that the sort of fudges I am using ... So I need a "C" compiler that will, at least cross compile to the I370 (not ... (comp.lang.c) - Re: PLEASE READ (was Re: recursive proofs)
... how would I have had Nash fix it properly? ... you could have told him to write the constant expression in a manner ... > that adheres to the C standard, instead of suggesting he use a compiler ... (comp.programming) - Re: Initializing constants
... This is why it's impossible for a compiler to allow ... Not for what C calls a constant expression, ... what is contained in the standard and what is provided by implementations are conceptually different things. ... Just mark the function that has to initialize the value as non-portable and requiring a separate implementation on each platform; you can fill the value with a nonsense constant and barf on startup if the initialization function isn't implemented. ... (comp.lang.c) - Re: Integer Rounding in C
... On another platform, rounding is towards zero, and (-1 / ... that "The semantic rules for the evaluation of a constant expression ... of the execution environment as is practically possible. ... compiler, the compiler pass might know about arithmetic details of the ... (comp.lang.c) |
|