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 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.

Jason


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