This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/58714] Bogus overload resolution for the assignment operator in assignment to a conditional


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58714

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code

--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
The C++03 wrong-code version:

struct X {
    X& operator=(const X&){}
    X& operator=(X&){__builtin_abort();}
};

int main(int argv,char**) {
  X a, b;
  ((argv > 2) ? a : b) = X();
}

I don't know if stabilize_expr is wrong, or if it is wrong to call it, I'll
leave that to someone else.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]