parent
dce838e17d
commit
0e51ef9b6a
|
@ -1147,7 +1147,6 @@ build_array_ref (array, index)
|
|||
{
|
||||
tree rval, type;
|
||||
|
||||
index = default_conversion (index);
|
||||
if (index != error_mark_node
|
||||
&& TREE_CODE (TREE_TYPE (index)) != INTEGER_TYPE)
|
||||
{
|
||||
|
@ -1165,6 +1164,9 @@ build_array_ref (array, index)
|
|||
&& TYPE_MAIN_VARIANT (TREE_TYPE (index)) == char_type_node)
|
||||
warning ("array subscript has type `char'");
|
||||
|
||||
/* Apply default promotions *after* noticing character types. */
|
||||
index = default_conversion (index);
|
||||
|
||||
/* An array that is indexed by a non-constant
|
||||
cannot be stored in a register; we must be able to do
|
||||
address arithmetic on its address.
|
||||
|
|
Loading…
Reference in New Issue