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: Storage for uninitialized objects (PR 24626)


Paul Schlie <schlie@comcast.net> writes:

| Thank you for the explanation.
| 
| Given that it would appear that the only time the compiler may attempt
| to optimize the allocation/use of an un-initialized variable, is when it
| knows for certain it hasn't been initialized; might it be preferable to
| then assign it a deterministic cheap value such as 0 which it may then
| presume during optimization, given all remaining alternatives would seem
| to have less desirable potential consequences?

Reasonable people have different reasonable ideas of "cheap value".
I heard that some compilers in the past used the value 0xdeadbeef for
uninitialized pointers. 

-- Gaby


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