POV-Ray : Newsgroups : povray.off-topic : Quick C language-lawyer question... : Re: Quick C language-lawyer question... Server Time
5 Sep 2024 11:20:36 EDT (-0400)
  Re: Quick C language-lawyer question...  
From: Darren New
Date: 30 Jul 2009 19:05:44
Message: <4a722748$1@news.povray.org>
Warp wrote:
>   Some would also say that if you have to worry about the bit-pattern of
> null pointers, that's questionable optimization.

The only reason I brought it up is this grody code I'm trying to make work 
has a number of places where it initializes a structure to zero with 
memset(), and the structure has pointers in it.

Given that the structure is a description of the hardware built into the 
machine, it's not going to be portable to different CPUs anyway, but I just 
got curious as to whether I'd misunderstood last time I looked thru the 
specs. People often mistakenly argue that C++ guarantees the bit pattern is 
zero because you now write { char* x = 0; } instead of { char* x = NULL; }

-- 
   Darren New, San Diego CA, USA (PST)
   "We'd like you to back-port all the changes in 2.0
    back to version 1.0."
   "We've done that already. We call it 2.0."


Post a reply to this message

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