missed uninitialised variable warning
Gabriel Dos Reis
gdr@integrable-solutions.net
Mon Aug 4 18:32:00 GMT 2003
Alexandre Oliva <aoliva@redhat.com> writes:
| On Aug 4, 2003, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
|
| > unsigned char c = c;
|
| Actually, I *think* this invokes undefined behavior, because you use
| an uninitialized value. This is quite different from:
No. The reason is that there is no trap representation for unsigned
char. You can safely read an uninitialized unsigned char -- you just
get "random" bit patterns.
-- Gaby
More information about the Gcc
mailing list