POV-Ray : Newsgroups : povray.off-topic : Random C craziness : Re: Random C craziness Server Time
7 Sep 2024 13:21:41 EDT (-0400)
  Re: Random C craziness  
From: Warp
Date: 26 Jul 2008 16:31:44
Message: <488b89af@news.povray.org>
John VanSickle <evi### [at] hotmailcom> wrote:
> Casting back and forth from void* is considered exceptionally unwise in 
> C++, but it's considered a great way of writing tighter code in C.

  In fact, for example casting method pointers to void* and back is
undefined behavior and in no way guaranteed to work. (And, in fact,
in many compilers method pointers are as large as two regular pointers,
and thus casting to void* would drop information.)

-- 
                                                          - Warp


Post a reply to this message

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