This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch/RFC] PR 55951


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]