Fix obj-c++.dg/encode-10.mm with cxx_dialect == cxx11.
authorJason Merrill <jason@redhat.com>
Wed, 6 May 2015 02:24:49 +0000 (22:24 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 6 May 2015 02:24:49 +0000 (22:24 -0400)
* constexpr.c (potential_constant_expression_1) [AT_ENCODE_EXPR]:
Return false.

From-SVN: r222841

gcc/cp/ChangeLog
gcc/cp/constexpr.c

index 09476c43a01ca32e79fefb78f5a283e5725f13e2..fc543e6dba9f71932a85afb9a9a0289fe8d10ab2 100644 (file)
@@ -1,5 +1,8 @@
 2015-05-05  Jason Merrill  <jason@redhat.com>
 
+       * 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
index 9ebb6406878e0863ff1607370ef457ce2f606f96..f35ec1e013f39c6903abd06f86976e719c883244 100644 (file)
@@ -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);