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: Signed int overflow behaviour in the security context


On Sat, Jan 27, 2007 at 02:47:44AM +0100, Andreas Bogk wrote:
> I'm exactly talking about the semantics of "undefined" here.  It would
> be immensely reassuring if a compiler would at least interpret this as
> "unspecified, but consistent".  Even better would be a defined and
> documented semantics for everything left undefined by the standard.

It does not, and you will not get what you want.  The effect of reading
an uninitialized variable is undefined, as is the effect of trying to
access a heap structure that has been deleted.  There are many others.
"undefined" means that you might get any value at all, the program might
crash, etc.

Those who are eager to have everything defined and repeatable should
choose a different programming language, say, Java.  C and C++ don't
do what you want, and you're not going to convince the developers to
cripple the compiler the way you want no matter how much you post.



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