Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Outputting u64 word using printf?

Author: Eugene Nalimov

Date: 09:56:12 06/07/04

Go up one level in this thread


On June 07, 2004 at 11:40:33, Gian-Carlo Pascutto wrote:

>On June 07, 2004 at 11:11:37, Heiner Marxen wrote:
>
>>No.  I've used this kind of shifts to assert that the type "int" can contain
>>a certain amount of bits.  If the compiler would switch arbitrarily among
>>types, I'd have a problem.  C has a system of implicit casts, but it does
>>not apply to this case.
>
>So basically it should always give 0 assuming the native type is 32 bits?

No. C Standard explicitly states that result of such shift is *undefined*, not
even implementation-defined or unspecified.

Thanks,
Eugene

>--
>GCP



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.