Hi, On Fri, 2008-06-27 at 14:13 +0200, Ákos Balázs wrote: > Hi Gerrit, Carsten, > > sorry for the late reply, I was a bit busy in the last week. > > On Mon, Jun 16, 2008 at 5:14 AM, Gerrit Voss <[EMAIL PROTECTED]> wrote: > > yeah my fault ;-), but I treat reinterpret_casts quite carefully, > > especially since gcc started to use structural information > > to optimise. So that's why some static_casts are still there > > if I did not hit a compiler complain. This is a little bit optimistic > > for template code, especially if I miss to build some of the tests > > as in this case ;-( > > What do you mean by using structural information? I thought > reinterpret_casts by definition only change the type of the object > pointed to, but perform no implicit conversions whatsoever. Can you > give me a URL or other such pointer where this gcc optimization is > described?
as far as I looked into it has to do with aliasing assumptions, in particular the fact that the standard allows the compiler to assume (with -O3 and -fstrict-aliasing) that pointers of different types can not point to the same address. At one point alignment seems to enter the game too. google for warning: dereferencing type-punned pointer will break strict-aliasing which is the warning gcc gives if it detects this kind of situation. kind regards, gerrit ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
