OSDN Git Service

(process_init_element): Check for constructor_type
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Feb 1994 22:41:53 +0000 (22:41 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Feb 1994 22:41:53 +0000 (22:41 +0000)
set before dereferencing it in the string cst code.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6656 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-typeck.c

index b233385..97fb256 100644 (file)
@@ -5872,6 +5872,7 @@ process_init_element (value)
   /* Handle superfluous braces around string cst as in
      char x[] = {"foo"}; */
   if (string_flag
+      && constructor_type
       && TREE_CODE (constructor_type) == ARRAY_TYPE
       && TREE_CODE (TREE_TYPE (constructor_type)) == INTEGER_TYPE
       && integer_zerop (constructor_unfilled_index))