This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r269506 - in /branches/gcc-8-branch/gcc: cp/Cha...
- From: jason at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Fri, 08 Mar 2019 20:50:31 -0000
- Subject: r269506 - in /branches/gcc-8-branch/gcc: cp/Cha...
Author: jason
Date: Fri Mar 8 20:50:31 2019
New Revision: 269506
URL: https://gcc.gnu.org/viewcvs?rev=269506&root=gcc&view=rev
Log:
PR c++/89576 - if constexpr of lambda capture.
Now that we're doing implicit lambda capture in templates, we see x here as
the lambda capture. maybe_convert_cond was doing nothing in a template, so
we never called mark_rvalue_use on x. As part of the broad move toward
doing more processing of non-dependent expressions, let's do this
conversion.
* semantics.c (maybe_convert_cond): Do convert a non-dependent
condition in a template.
* typeck.c (condition_conversion): Handle being called in a
template.
Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp1z/constexpr-if28.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/semantics.c
branches/gcc-8-branch/gcc/cp/typeck.c