[Bug c++/114561] [11/12/13/14 Regression] Comma operator with forwarding reference to pointer raises invalid lvalue required error since r10-7410

2024-04-02 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114561

--- Comment #6 from GCC Commits  ---
The trunk branch has been updated by Jason Merrill :

https://gcc.gnu.org/g:5d7e9a35024f065b25f61747859c7cb7a770c92b

commit r14-9757-g5d7e9a35024f065b25f61747859c7cb7a770c92b
Author: Jason Merrill 
Date:   Tue Apr 2 10:52:28 2024 -0400

c++: binding reference to comma expr [PR114561]

We represent a reference binding where the referent type is more qualified
by a ck_ref_bind around a ck_qual.  We performed the ck_qual and then tried
to undo it with STRIP_NOPS, but that doesn't work if the conversion is
buried in COMPOUND_EXPR.  So instead let's avoid performing that fake
conversion in the first place.

PR c++/114561
PR c++/114562

gcc/cp/ChangeLog:

* call.cc (convert_like_internal): Avoid adding qualification
conversion in direct reference binding.

gcc/testsuite/ChangeLog:

* g++.dg/conversion/ref10.C: New test.
* g++.dg/conversion/ref11.C: New test.

[Bug c++/114561] [11/12/13/14 Regression] Comma operator with forwarding reference to pointer raises invalid lvalue required error since r10-7410

2024-04-02 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114561

Jason Merrill  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
 Status|NEW |ASSIGNED
 CC||jason at gcc dot gnu.org

[Bug c++/114561] [11/12/13/14 Regression] Comma operator with forwarding reference to pointer raises invalid lvalue required error since r10-7410

2024-04-02 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114561

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|--- |11.5
   Priority|P3  |P2

[Bug c++/114561] [11/12/13/14 Regression] Comma operator with forwarding reference to pointer raises invalid lvalue required error since r10-7410

2024-04-02 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114561

Jakub Jelinek  changed:

   What|Removed |Added

Summary|Comma operator with |[11/12/13/14 Regression]
   |forwarding reference to |Comma operator with
   |pointer raises invalid  |forwarding reference to
   |lvalue required error   |pointer raises invalid
   ||lvalue required error since
   ||r10-7410
 CC||jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  ---
Started with r10-7410-g72809d6fe8e085440403ce125c51d01d6e7512b0 too.