This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Help on gcc
- From: Per Bothner <per at bothner dot com>
- To: James Dressler <jamesmdr at hotmail dot com>
- Cc: aoliva at redhat dot com, gcc at gcc dot gnu dot org
- Date: Tue, 05 Feb 2002 15:55:58 -0800
- Subject: Re: Help on gcc
- References: <LAW2-F142SQejtuH6oM0001dcee@hotmail.com>
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/