<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jun 16, 2012, at 8:23 PM, Cesar Mello wrote:</div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">While this will make it compile, the code is not valid to begin with.<br>It is trying to do a raw memory copy of a non standard-layout type.<br>nameoffset is not guaranteed to directly follow cmdsize.<br></span></blockquote></div><br><div>Are you saying that in:</div><div><br></div><div>struct A {</div><div>    int  f1;   // offset 0</div><div>    int  f2;   // offset 4</div><div>};</div><div><br></div><div>struct B : public A {</div><div><div>    int  f3;   // offset 8 ?</div></div><div>};</div><div><br></div><div>that f3 is not guaranteed to have the same offset it would have had, had it been the third field of A (offset 8)?</div><div><br></div><div>-Nick</div><div><br></div><div><br></div></body></html>