<div dir="ltr">On Thu, Mar 21, 2013 at 9:17 PM, Joćo Matos <span dir="ltr"><<a href="mailto:ripzonetriton@gmail.com" target="_blank">ripzonetriton@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, Mar 21, 2013 at 11:22 PM, Will Wilson <span dir="ltr"><<a href="mailto:will@indefiant.com" target="_blank">will@indefiant.com</a>></span> wrote:<br>
</div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Oddly enough I've been working on this exact area myself over the last few days. I could be overlooking something but it appears to be missing support for the X64 ABI (ie. amd64-pc-win32) which would be a shame not to support. I've previously spent some time analyzing it and came up with the following member function pointer sizes:</div>


</blockquote><div><br></div></div><div>I agree, X64 ABI support would be nice.</div></div></blockquote><div><br></div><div style>It would be nice, but I'd rather have i386 first.  :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>
The inheritance keywords should be definitive for the rest of the TU. MSVC will issue an error should the class definition not match the assigned inheritance keyword - this is a useful sanity check and probably worth implementing. The error in question is C2286 and is outlined here: <a href="http://msdn.microsoft.com/en-gb/library/9z8tbhb2.aspx" target="_blank">http://msdn.microsoft.com/en-gb/library/9z8tbhb2.aspx</a></div>


</div></div></blockquote><div><br></div></div><div>I already tried to add a warning for this, see <span style="white-space:pre-wrap">r163078, but that got reverted at the time. We should definitely add a warning for this.</span></div>
</div></blockquote><div><br></div><div style>Yeah, I didn't add that into this patch to focus on just the ABI stuff. </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>In addition, MSVC has a nasty corner case. If a member function pointer is instantiated based on an (as yet) undefined class the class is assigned the unknown inheritance for the rest of the translation unit - even if the class is defined later in the TU. I've been wondering how best to model this persistant state and the only approach I could come up with was to assign a (currently unimplemented) UnknownInheritanceAttr during sema - but it's not pretty.</div>


</div></div></blockquote><div><br></div></div><div>Interesting, that sounds indeed a bit tricky to implement.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir="ltr"><div>Lastly, I haven't had a chance to revisit it, but MSVC seems to do weird things with member function pointer alignment. I know this isn't specific to this patch but I thought I'd mention it. Hopefully I'll get the chance to research it soon and get to the bottom of the implementation.</div>


</div></blockquote><div><br></div></div><div> File a bug about this when you know more details so we do not forget it.</div></div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br>Joćo Matos
</font></span><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div>