https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80935
--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- Author: aldyh Date: Wed Sep 13 17:39:03 2017 New Revision: 252619 URL: https://gcc.gnu.org/viewcvs?rev=252619&root=gcc&view=rev Log: PR c++/80935 - wrong C++17 error with lambda * decl.c (check_for_uninitialized_const_var): Check is_instantiation_of_constexpr. * constexpr.c (ensure_literal_type_for_constexpr_object): Check is_instantiation_of_constexpr. (potential_constant_expression_1): Check var_in_maybe_constexpr_fn. Added: branches/range-gen2/gcc/testsuite/g++.dg/cpp1z/constexpr-lambda16.C Modified: branches/range-gen2/gcc/cp/ChangeLog branches/range-gen2/gcc/cp/constexpr.c branches/range-gen2/gcc/cp/decl.c