POV-Ray : Newsgroups : povray.off-topic : All your radix are belong to us! : Re: All your radix are belong to us! Server Time
29 Jul 2024 16:19:28 EDT (-0400)
  Re: All your radix are belong to us!  
From: Darren New
Date: 23 Jul 2011 13:40:21
Message: <4e2b0785@news.povray.org>
On 7/23/2011 10:36, Warp wrote:
>    But there are many architectures where dereferencing null will trap,

Yes, I know that. :-)

>    If dereferencing null is normal in a certain architecture,

I didn't say it's normal. I said it's something someone who knows the 
hardware might expect and thus be surprised by the compiler deleting 
completely different code.

If I compiled something like that first version for a Z-80, I can easily 
believe I would be surprised if that code ever wrote to the interrupt 
vector.  I'm not criticizing C. I'm simply saying it's reasonable to be 
surprised. :-)

>    Then these people either have to learn C properly, or not use it.
> It really is a case of "take it or leave it".

Yes. I'm simply pointing out to people who know C very well why it would be 
that people who don't know it very well might be surprised. Heck, code like 
that wound up in the Linux kernel, so I think it's save to say "it sometimes 
surprises even experts", yes?

-- 
Darren New, San Diego CA, USA (PST)
   "Coding without comments is like
    driving without turn signals."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.