[Bug c++/70610] [6 regression] error: invalid initialization of non-const reference of type

2016-07-11 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70610 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |6.0

[Bug c++/70610] [6 regression] error: invalid initialization of non-const reference of type

2016-04-12 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70610 Patrick Palka changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/70610] [6 regression] error: invalid initialization of non-const reference of type

2016-04-12 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70610 --- Comment #7 from Patrick Palka --- Author: ppalka Date: Wed Apr 13 00:06:51 2016 New Revision: 234926 URL: https://gcc.gnu.org/viewcvs?rev=234926=gcc=rev Log: Fix PR c++/70610 (wrong overload resolution during template processing)

[Bug c++/70610] [6 regression] error: invalid initialization of non-const reference of type

2016-04-11 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70610 --- Comment #6 from Patrick Palka --- uhhh... here: https://gcc.gnu.org/ml/gcc-patches/2016-04/msg00482.html

[Bug c++/70610] [6 regression] error: invalid initialization of non-const reference of type

2016-04-11 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70610 Patrick Palka changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug c++/70610] [6 regression] error: invalid initialization of non-const reference of type

2016-04-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70610 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org,

[Bug c++/70610] [6 regression] error: invalid initialization of non-const reference of type

2016-04-10 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70610 --- Comment #3 from Patrick Palka --- Not limited to operator overloads either: void bar (const int &, int &); void bar (int &, const int &); void bar (const int &, const int &); int a, b; template void foo () { bar (a + 1, b + 2); }

[Bug c++/70610] [6 regression] error: invalid initialization of non-const reference of type

2016-04-10 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70610 --- Comment #2 from Patrick Palka --- This general issue about the unconditional lvalue-ness of NON_DEPENDENT_EXPR existed before my patch for PR c++/21802 though. For example, ere's a test case that should compile cleanly but doesn't since at

[Bug c++/70610] [6 regression] error: invalid initialization of non-const reference of type

2016-04-10 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70610 --- Comment #1 from Patrick Palka --- The problem is that during template processing we think the operand to the unary + is an lvalue (because it's wrapped in a NON_DEPENDENT_EXPR node) and so during overload resolution we select the non-const