From 81b6a6c55bd5b2549dbaa16a87e736c4c8ac1bf5 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 5 May 2015 22:24:49 -0400 Subject: [PATCH] Fix obj-c++.dg/encode-10.mm with cxx_dialect == cxx11. * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]: Return false. From-SVN: r222841 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/constexpr.c | 1 + 2 files changed, 4 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 09476c43a01..fc543e6dba9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2015-05-05 Jason Merrill + * constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]: + Return false. + * semantics.c (finish_call_expr): Check complain. * decl2.c (reset_type_linkage_2): Update the DECL_NAME of a diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 9ebb6406878..f35ec1e013f 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -4159,6 +4159,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, case OBJ_TYPE_REF: case TRANSACTION_EXPR: case ASM_EXPR: + case AT_ENCODE_EXPR: fail: if (flags & tf_error) error ("expression %qE is not a constant-expression", t); -- 2.30.2