Re: [GD-General] Offset a void pointer
Brought to you by:
vexxed72
From: Richard F. <ra...@gm...> - 2004-10-14 14:11:09
|
if you are referring to this: http://gcc.gnu.org/gcc-3.4/changes.html from the section starting: "The cast-as-lvalue extension has been removed for C++ and deprecated for C and Objective-C. In particular, code like this: " then that is just that GCC has caught up with MS compilers in dissallowing the implicit lvalue return of standard C style casts Still appears to be perfectly legal to cast to an explicit lvalue type... Please correct me if i am wrong on this... At least in my head it certainly seems to make no sense to take out casting to a modifiable type... Regarding Ola Olsson: static_cast is a little bit safer, as the types Cavey Gerard was referring to were reasonably compatible. AFAIK reinterpret_cast is used to allow you to do more "dodgy" casting, e.g. between a function pointer and a float, something which static_cast does not do... Again, please correct me if i am wrong. On Wed, 13 Oct 2004 13:42:53 +0200, Antoine Chavasse <a.c...@gm...> wrote: > On Wed, 13 Oct 2004 10:23:16 +0100, Richard Fabian <ra...@gm...> wrote: > > > > > so really it just boils down to what you're comfortable with, with te > > caveat that maybe you should be comfortable with using cast to lvalue. > > However, afaik using cast as lvalues isn't standard. > It's deprecated now in gcc. > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=557 > |