OK.
Jason
Hi,
On 03/26/2013 04:10 PM, Jason Merrill wrote:
On 03/26/2013 11:00 AM, Paolo Carlini wrote:
+ tree ce_index = cxx_constant_value (ce->index);
+
+ if (TREE_CODE (ce_index) == INTEGER_CST)
+{
/* A C99 designator is OK if it matches the current index. */
- if (TREE_IN
On 03/26/2013 11:00 AM, Paolo Carlini wrote:
+ tree ce_index = cxx_constant_value (ce->index);
+
+ if (TREE_CODE (ce_index) == INTEGER_CST)
+ {
/* A C99 designator is OK if it matches the current index. */
- if (TREE_INT_CST_LOW (ce->index) == index)
+ i
Hi,
On 03/26/2013 03:15 PM, Jason Merrill wrote:
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);
+
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 = cx
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
Hi,
On 03/26/2013 01:32 PM, Jason Merrill wrote:
On 03/26/2013 08:09 AM, Paolo Carlini wrote:
check_array_designated_initializer is called by reshape_init* with
ce->index a CONST_DECL, not an INTEGER_CST. Thus I wondered if in such
cases it's just matter of using integral_constant_value on it,
On 03/26/2013 08:09 AM, Paolo Carlini wrote:
check_array_designated_initializer is called by reshape_init* with
ce->index a CONST_DECL, not an INTEGER_CST. Thus I wondered if in such
cases it's just matter of using integral_constant_value on it, thus
something like the below (which passes testing
Hi,
in mainline and 4.8, at variance with 4.7, for:
enum { A };
static const char *a[] = {
[A] = "a"
};
check_array_designated_initializer is called by reshape_init* with
ce->index a CONST_DECL, not an INTEGER_CST. Thus I wondered if in such
cases it's just matter of using integral_constan