This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: missed uninitialised variable warning
- From: dewar at gnat dot com (Robert Dewar)
- To: aoliva at redhat dot com, gdr at integrable-solutions dot net
- Cc: akpm at osdl dot org, dewar at gnat dot com, gcc at gcc dot gnu dot org, guerby at acm dot org,matz at suse dot de, pinskia at physics dot uc dot edu
- Date: Mon, 4 Aug 2003 14:38:04 -0400 (EDT)
- Subject: Re: missed uninitialised variable warning
> 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.
There is absolutely NO justification for this position. The formal semantics
does not begin to guarantee this behavior. You are just restating the likely
actual behavior of what is formally undefined behavior. At least that's my
reading of the standard. If you manage to read otherwise, please let's see
how!
neither C nor C++ are defined by what happens to work!