(process_init_element): Treat string constants specially
authorRichard Stallman <rms@gnu.org>
Sat, 31 Jul 1993 20:13:36 +0000 (20:13 +0000)
committerRichard Stallman <rms@gnu.org>
Sat, 31 Jul 1993 20:13:36 +0000 (20:13 +0000)
only for arrays of integers.

From-SVN: r5048

gcc/c-typeck.c

index 2e0d0f61386e323589582484cb86f4390191c722..9f2a8bc82eee993abfe3b12d827f87e0746bcb24 100644 (file)
@@ -6005,6 +6005,7 @@ process_init_element (value)
      char x[] = {"foo"}; */
   if (string_flag
       && TREE_CODE (constructor_type) == ARRAY_TYPE
+      && TREE_CODE (TREE_TYPE (constructor_type)) == INTEGER_TYPE
       && integer_zerop (constructor_unfilled_index))
     {
       constructor_stack->replacement_value = value;