Author: Fabien Letouzey
Date: 10:29:04 06/07/04
Go up one level in this thread
On June 07, 2004 at 13:13:33, Vincent Diepeveen wrote: >The result is undefined when integer = 32 bits and long long is 64 bits. >Trivially it is a very natural thing to try to write r = 1 << 36 when using a 64 >bits type; >Needing to cast every non-integer is not a nice way of programming now that all >processors are getting 64 bits, and 99% of all programmers will make mistakes >with it, basically taking care C/C++ in the future is not a serious programming >language. >Because ansi-C definitely runs behind here on good programming habits, it's up >to the compilers mercy whether it works or doesn't, so only good compilers will >support it, as they support a natural way of working with the environment. >The rule in ansi-C should read that for constants assigned, they should be >assumed to have the same type and not that they should be assumed to be integer. I see, thanks! It makes sense, but I'm not sure if this can be applied in a consistent way (in more complex expressions). Fabien.
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.