projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f95d3af
)
(process_init_element): Check for constructor_type
author
Jim Wilson
<wilson@gcc.gnu.org>
Sun, 27 Feb 1994 22:41:53 +0000
(14:41 -0800)
committer
Jim Wilson
<wilson@gcc.gnu.org>
Sun, 27 Feb 1994 22:41:53 +0000
(14:41 -0800)
set before dereferencing it in the string cst code.
From-SVN: r6656
gcc/c-typeck.c
patch
|
blob
|
history
diff --git
a/gcc/c-typeck.c
b/gcc/c-typeck.c
index b23338583be4f99001f503f893dfdb3949bf9809..97fb2568840feb789a0da20be5e38ecc1f9f97dc 100644
(file)
--- a/
gcc/c-typeck.c
+++ b/
gcc/c-typeck.c
@@
-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))