This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58714] Bogus overload resolution for the assignment operator in assignment to a conditional
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 Oct 2013 21:12:16 +0000
- Subject: [Bug c++/58714] Bogus overload resolution for the assignment operator in assignment to a conditional
- Auto-submitted: auto-generated
- References: <bug-58714-4 at http dot gcc dot gnu dot org/bugzilla/>
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.