c-typeck.c (output_init_element): Check for type == error_mark_node.
gcc: * c-typeck.c (output_init_element): Check for type == error_mark_node. gcc/testsuite: * gcc.dg/noncompile/init-4.c.c: New test. From-SVN: r65328
This commit is contained in:
parent
093b05b68f
commit
d5019ba399
@ -1,3 +1,7 @@
|
||||
2003-04-07 J"orn Rennecke <joern.rennecke@superh.com>
|
||||
|
||||
* c-typeck.c (output_init_element): Check for type == error_mark_node.
|
||||
|
||||
2003-04-07 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* config/h8300/h8300.md (*zero_extendqisi2_h8300hs): Always
|
||||
|
@ -6227,6 +6227,11 @@ output_init_element (value, type, field, pending)
|
||||
tree value, type, field;
|
||||
int pending;
|
||||
{
|
||||
if (type == error_mark_node)
|
||||
{
|
||||
constructor_erroneous = 1;
|
||||
return;
|
||||
}
|
||||
if (TREE_CODE (TREE_TYPE (value)) == FUNCTION_TYPE
|
||||
|| (TREE_CODE (TREE_TYPE (value)) == ARRAY_TYPE
|
||||
&& !(TREE_CODE (value) == STRING_CST
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-04-07 J"orn Rennecke <joern.rennecke@superh.com>
|
||||
|
||||
* gcc.dg/noncompile/init-4.c.c: New test.
|
||||
|
||||
2003-04-06 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* gcc.misc-test/gcov-9.c: New test.
|
||||
|
3
gcc/testsuite/gcc.dg/noncompile/init-4.c
Normal file
3
gcc/testsuite/gcc.dg/noncompile/init-4.c
Normal file
@ -0,0 +1,3 @@
|
||||
struct a { char *b; } c[D] /* { dg-error "undeclared" } */
|
||||
= /* { dg-error "storage size" } */
|
||||
{ { "" } } ; /* { dg-warning "braces around scalar initializer|near" } */
|
Loading…
x
Reference in New Issue
Block a user