home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 242,866 of 243,242   
   Waldek Hebisch to highcrew   
   Re: function pointer question   
   07 Jan 26 09:25:31   
   
   From: antispam@fricas.org   
      
   highcrew  wrote:   
   > On 1/6/26 3:50 PM, Waldek Hebisch wrote:   
   >> Well, '(void)*foo' effectively says "foo" is not a null pointer   
   >> (otherwise if would be undefined behaviour).  Good optimizer   
   >> will_not_ dereference foo, but keep information for further   
   >> use.   
   >   
   > Hehe, now that I understand more of UB, that is correct, but   
   > I don't think you can *rely* on the optimizer behavior, can you?   
      
   Well, there is no warranty, but IME gcc is pretty reliable at   
   removing such accesses.   
      
   --   
                                 Waldek Hebisch   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca