On 2005-04-26 13:15:43 -0700, Zack Weinberg wrote: > The initializer thus tries to give a variable with type unsigned:8 > a value that it cannot hold. The diagnostic is correct.
However it is correct to store any integer to an unsigned variable, even if the original value cannot be represented. Therefore the diagnostic isn't necessary, and IMHO, there should be a way to disable it (possibly locally to some part of the program). > Bruce Lilly <[EMAIL PROTECTED]> writes: > > static const unsigned char AAA = 0x1U; > > static const unsigned char BBB = 0x2U; > > Again, C does not work the way you think. These are not constants. But if they are never modified, they evaluate to constants, right? The fact that they are not considered as constant expressions, is it due to the fact that the environment is allowed to modify them? -- Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / SPACES project at LORIA