On 03/26/2013 10:14 AM, Jason Merrill wrote:
On 03/26/2013 09:17 AM, Paolo Carlini wrote:
+      if (identifier_p (ce->index))
+    {
+      error ("name %qD used in a GNU-style designated "
+         "initializer for an array", ce->index);
+      return false;
+    }
+
+      tree ce_index = cxx_constant_value (ce->index);
+
        /* The parser only allows identifiers as designated
       initializers.  */
        if (ce->index == error_mark_node)
      error ("name used in a GNU-style designated "
             "initializer for an array");

Let's also combine these two instances of the same error.

Or at any rate move the error_mark_node case above cxx_constant_value as well.

Jason


Reply via email to