<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.6266" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY 
style="WORD-WRAP: break-word; webkit-nbsp-mode: space; webkit-line-break: after-white-space" 
bgColor=#ffffff>
<DIV>On Wednesday, September 12, 2012 6:26 PM, John McCall wrote:</DIV>
<DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV>
  <DIV>On Sep 12, 2012, at 4:24 AM, Richard Smith wrote:</DIV>
  <BLOCKQUOTE type="cite">On Wed, Sep 12, 2012 at 2:08 AM, Andy Gibbs <SPAN 
    dir=ltr><<A href="mailto:andyg1001@hotmail.co.uk" 
    target=_blank>andyg1001@hotmail.co.uk</A>></SPAN> wrote:<BR>
    <DIV class=gmail_quote>
    <BLOCKQUOTE class=gmail_quote 
    style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid; POSITION: static">Hi,<BR><BR>Attached 
      are two patches to complement the recent work done by David Robins on 
      __interface.<BR><BR>The first, interface-fix.diff, corrects a codegen 
      regression created by r163013 whereby all methods (including constructors) 
      inside an __interface were being marked pure virtual and were causing the 
      vtable generation to be invalid.<BR></BLOCKQUOTE>
    <DIV><FONT face=Arial size=2></FONT><BR></DIV>
    <DIV>Applying this to operators doesn't seem correct, since an __interface 
    shouldn't have any operators in the first place.  Also, 
    getOverloadedOperator doesn't check for conversion 
  operators.</DIV></DIV></BLOCKQUOTE>
  <DIV><FONT face=Arial size=2></FONT><BR></DIV>Presumably it gets the implicit 
  copy/move assignment operators, which should definitely not be virtual.</DIV>
  <DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><BR></DIV>
  <DIV>Oh, and could someone check whether __interface implicitly declares a 
  virtual destructor?  That seems like a possibility.</DIV>
  <DIV><FONT face=Arial size=2></FONT><BR></DIV>
  <DIV>John. </DIV></BLOCKQUOTE></DIV>
<DIV><FONT face=Arial size=2>That's right, but as Richard pointed out, if the 
two patches are combined, it is enough to check if the method is user-provided 
(since user-provided constructors, destructors and operators are not 
allowed).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Attached here is the patch that incorporates 
Richard's comments.  Since the fix is dependent on the enhancement, I've 
rolled it now into one patch.  I've also implemented a diagnostic message 
on "private:" or "protected:" appearing inside the __interface as MSVC 
<STRONG>does</STRONG> give a diagnostic here too.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Cheers</FONT></DIV>
<DIV><FONT face=Arial size=2>Andy</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>