This is the mail archive of the
mailing list for the GCC project.
Re: missed uninitialised variable warning
Alexandre Oliva <firstname.lastname@example.org> writes:
| On Aug 4, 2003, Gabriel Dos Reis <email@example.com> 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.