<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Hi,</div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; ">last year I submitted a patch (commit by somebody else) to solve cases like this:</div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><br></div><div style="background-color: transparent; "><div style="background-color: transparent; "><font face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space: pre; ">       </span>// The addition of a double anywhere in this struct forces the vtable ptr to occupy 4 bytes
 + 4 bytes padding in MSVC</font></div><div style="background-color: transparent; "><font face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">    </span>struct DoubleInPolymorphicStruct</font></div><div style="background-color: transparent; "><font face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>{</font></div><div style="background-color: transparent; "><font face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>virtual void Empty() { }</font></div><div style="background-color: transparent; "><font face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">         </span>int a;</font></div><div style="background-color: transparent; "><font face="arial, helvetica, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre">           </span>double b;</font></div><div
 style="background-color: transparent; "><span class="Apple-tab-span" style="font-family: arial, helvetica, sans-serif; font-size: 13px; background-color: transparent; white-space: pre; ">     </span><span style="font-family: arial, helvetica, sans-serif; font-size: small; background-color: transparent; ">};</span><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; ">The offset of a in MSVC is 8 bytes, but clang in MSVC offset calculation mode puts it at 4. The initial posts are here:</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px;
 font-style: normal; background-color: transparent; "><span class="Apple-tab-span" style="white-space:pre">   </span><a href="http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-September/016944.html" style="background-color: transparent; ">http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-September/016944.html</a></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; "><span class="Apple-tab-span" style="white-space:pre">     </span><a href="http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-September/016970.html" style="background-color: transparent; ">http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-September/016970.html</a></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px;
 font-style: normal; background-color: transparent; ">These changes did not make it into 3.0 but as far as I could tell, did make it into the trunk. However, I've just sync'ed up to the 3.1 release and this is still a problem.</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; ">I'm about to go back and take a look and what's broken but it'll take me a couple of hours to settle back into the code again.</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent;
 ">Meanwhile, could anybody help with any ideas as to what may have changed?</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; ">Thanks!</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; ">- Don</div></div></div></body></html>