This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Storage for uninitialized objects (PR 24626)
- From: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- To: Robert Dewar <dewar at adacore dot com>
- Cc: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>, Steven Bosscher <steven at gcc dot gnu dot org>, gcc at gcc dot gnu dot org, schlie at comcast dot net, ian at airs dot com, jsm28 at gcc dot gnu dot org
- Date: 15 Jan 2006 14:23:36 -0600
- Subject: Re: Storage for uninitialized objects (PR 24626)
- References: <200601151935.k0FJZ0OI002472@hiauly1.hia.nrc.ca> <43CAA5CA.2060602@adacore.com>
Robert Dewar <dewar@adacore.com> writes:
| John David Anglin wrote:
|
| > This seems pretty clear. C99 requires that storage be allocated
| >
| >for uninitialized objects, that an indeterminate value be stored
| >in the object when the declarator for the object is reached in the
| >block, that the last-stored value be retained for the duration of
| >the block.
| >
| I think that is an incorrect interpretation. Remember the standard is
| always "as-if" when it gives an implementation approach. Please
| show a correct C program that can tell that gcc is not following
| the above scheme.
Robert,
Recently you have expressed the opinion that sounds to me that GCC is
taking too much a cavalier approach to "undefined behaviour".
However, as long as you feed that line of thought with reasoning like
above, I don't see how the current trend will change. Or did you
express that opinion just as a matter of debate?
-- Gaby