Storage for uninitialized objects (PR 24626)
Gabriel Dos Reis
gdr@cs.tamu.edu
Sun Jan 15 20:21:00 GMT 2006
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
More information about the Gcc
mailing list