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: Help on gcc


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


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