Am Dienstag, 11. März 2008 08:43:03 schrieb Per Inge Mathisen: > On Tue, Mar 11, 2008 at 12:27 AM, Giel van Schijndel <[EMAIL PROTECTED]> > wrote: > > > Just to nitpick a little bit. You cannot downcast, since the memory > > > address points to the child object. Take this example: > > > > Erm to use this example: > > > > typedef struct > > { > > some_type X; > > } a_new_type; > > > > a_new_type Y; > > > > Now my point is that the starting address of Y is _exactly_ the same to > > that of Y.X because Y.X is the first struct member of Y. > > Clever, but unless I misunderstand the standard, this casting would > still violate strict aliasing, though? It could, and it would be just another form of uglyness, imo.
--Dennis
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev