Re: The result of 1 << 32
- From: "Old Wolf" <oldwolf@xxxxxxxxxxxxxx>
- Date: 30 Oct 2005 19:16:36 -0800
Jordan Abel wrote:
> On 2005-10-30, Walter Roberson <roberson@xxxxxxxxxxxxxxxxxx> wrote:
> > I don't have my reference material here, but I seem to recall that
> > constant calculations are supposed to be done "as if" they were
> > done at run-time. Possibly that only applied to calculations in
> > preprocessor expressions.
>
> It does not apply to undefined behavior.
>
> > If my recollection is correct, then even though the shift
> > behaviour is undefined, would it not be required to be consistant?
>
> There are no rules which apply to undefined behavior. Were this
> unspecified or implementation-defined, that would be true.
It is not true for unspecified behaviour either. The code
foo( f(), g() );
could call f and g in different orders depending on what day
of the week it is.
.
- References:
- The result of 1 << 32
- From: mrby
- Re: The result of 1 << 32
- From: Jordan Abel
- Re: The result of 1 << 32
- From: Jordan Abel
- The result of 1 << 32
- Prev by Date: Re: Sort of mystified from an earlier thread
- Next by Date: Re: Calendar Program
- Previous by thread: Re: The result of 1 << 32
- Next by thread: Re: The result of 1 << 32
- Index(es):