This is the mail archive of the
mailing list for the GCC project.
Re: Help on gcc
- From: Robert Lipe <robertlipe at usa dot net>
- To: James Dressler <jamesmdr at hotmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 5 Feb 2002 17:40:26 -0600
- Subject: Re: Help on gcc
- References: <LAW2-F142SQejtuH6oM0001dcee@hotmail.com>
James Dressler wrote:
> Imagine, for example, that it's not a NULL pointer, but a pointer that
> dereferences an area of memory, previously allocated using "new", that
> has been already returned to the operational system by a "delete"
> statement. It will not work too. No exception raised.
Or it may be. Depends on the memory management in question. We can
produce examples either way. That's the whole point of undefined
behaviour. You can't *count* on a specific behaviour.
> For your information, although I think you already know, it works on
> Microsoft C++ Compiler, and many others C++ Compilers.
While "compiler balloting" has a place, it's not a way to interpret the
language of the standard. And the language standard says what you are
doing is undefined. Alexandre way trying to make that point colorfully.
> I guess if someone at Microsoft gave me an awful answer like you, what
> would happen to him. Probably, he would be fired. That's what you
Lighten up. The multiple smileys were there for a reason.