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?

  - Per

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to