Help on gcc

Robert Lipe robertlipe@usa.net
Tue Feb 5 15:42:00 GMT 2002


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
> deserve.

Lighten up.   The multiple smileys were there for a reason.  

RJL



More information about the Gcc mailing list