]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/92831 (CWG1299 extend_ref_init_temps_1 punts on COND_EXPRs)
authorJakub Jelinek <jakub@gcc.gnu.org>
Fri, 6 Dec 2019 23:43:45 +0000 (00:43 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 6 Dec 2019 23:43:45 +0000 (00:43 +0100)
commitbeefe639b25eb9855a12b1d1436bbbc6b88ac78e
treeb5b39b907c3380d8566db4059d20e12d8d43ca0d
parent1cd4fe3d4302f0db3dd38c720c69f0c51137ff13
re PR c++/92831 (CWG1299 extend_ref_init_temps_1 punts on COND_EXPRs)

PR c++/92831
* call.c (build_conditional_expr_1): For ?: with omitted middle
operand use cp_stabilize_reference if arg1 is glvalue_p rather than
just if it is lvalue_p.

* g++.dg/ext/temp-extend1.C: New test.

From-SVN: r279069
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/temp-extend1.C [new file with mode: 0644]