<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Inheriting from two classes with increment operators"
   href="http://llvm.org/bugs/show_bug.cgi?id=22772">22772</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Inheriting from two classes with increment operators
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.6
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ieee@bk.ru
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This program does not compile
class A
{
    public: 
    A& operator++(){return *this;}
};

class B
{
    public:
    B operator++(int){return *this;}        
};

class C:public A, public B
{
};

int main()
{
    C c;
    c.C::operator++(0);
    c.C::operator++();
}

Output:

20 : error: member 'operator++' found in multiple base classes of different
types
c.C::operator++(0);
^
4 : note: member found by ambiguous name lookup
A& operator++(){return *this;}
^
10 : note: member found by ambiguous name lookup
B operator++(int){return *this;}
^
21 : error: member 'operator++' found in multiple base classes of different
types
c.C::operator++();
^
4 : note: member found by ambiguous name lookup
A& operator++(){return *this;}
^
10 : note: member found by ambiguous name lookup
B operator++(int){return *this;}
^

But if I write c++ or ++c instead of explicit calls, it does. It seems like the
first responce is correct, because name lookup should be performed first,
without considering the argument list. GCC, for example, rejects the code in
both cases.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>