This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]