This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: missed uninitialised variable warning
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: dewar at gnat dot com (Robert Dewar)
- Cc: aoliva at redhat dot com, akpm at osdl dot org, 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: 04 Aug 2003 20:45:26 +0200
- Subject: Re: missed uninitialised variable warning
- Organization: Integrable Solutions
- References: <20030804183804.CAA57F2A5F@nile.gnat.com>
dewar@gnat.com (Robert Dewar) writes:
| > 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.
Huh? Can you provide reference to the protion of the standard that
says otheriwse?
| The formal semantics does not begin to guarantee this behavior.
You're wrong.
| You are just restating the likely actual behavior of what is
| formally undefined behavior.
No. That unsigned char don't have trap representation is rule by both
C and C++ standards.
| At least that's my reading of the standard.
Which portion did you read that way?
-- Gaby