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:
> I'm happy to tell you that it's impossible, on a operational system like 
> Solaris, Windows NT, Windows 2000, Linux and any other Unix-like system, 
> to "destroy the world" using a NULL pointer, because this is a logical 
> address.

The compiler doesn't know that.  People us Gcc to write kernel code.
Some even use G++ to do it.  Whether or how null pointer is trapped
is not the compiler's problem.  (Well, it could be, but that could
slow things down.)

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

But it could, as that too is undefined.  It's up to the run-time
environment and compiler what happens here.

> For your information, although I think you already know, it works on 
> Microsoft C++ Compiler, and many others C++ Compilers. To be happy, like 
> you said, it's better to go with them. Probably you think that gcc is a 
> joke, something to play with. You convinced me.

> And I don't see any relation between my sister and C++. 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.

I think you're the one who owes Mr Oliva an apology.  He gave you a
correct and helpful reply to your question; you're nasty in return
because you don't like his response and because he made a joke.

However, I'm sure Mr Oliva will be happy to refund the money you paid
for compiler support.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


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