diff options
| author | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-21 17:01:08 +0000 |
|---|---|---|
| committer | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-21 17:01:08 +0000 |
| commit | 61ba37bfdc89277570f40931fdfeb82dfefc5585 (patch) | |
| tree | 4f41c122c72dec3b860a1cabdb23536dbf18fbee /gcc/c-typeck.c | |
| parent | fedcccb5f9b79c9776b1429e3b4338e28efdef1f (diff) | |
| download | ppe42-gcc-61ba37bfdc89277570f40931fdfeb82dfefc5585.tar.gz ppe42-gcc-61ba37bfdc89277570f40931fdfeb82dfefc5585.zip | |
2004-12-19 James A. Morrison <phython@gcc.gnu.org>
PR c/18596
* c-parse.in (initdcl): Don't process a declaration if start_decl fails.
(notype_initdcl): Don't process a declaration if start_decl fails.
* c-decl.c (start_decl): Fail if grokdeclarator fails.
(grokdeclarator): Fail if a function definition has an invalid storage
class.
* c-typeck.c (start_init): Treat error_mark_node the same as 0.
testsuite:
PR c/18596
* gcc.dg/funcdef-storage-1.c (foo): Remove.
* gcc.dg/pr18596-1.c: Use dg-error.
(dg-options): Use -fno-unit-at-a-time.
* gcc.dg/pr18596-2.c: New test.
* gcc.dg/pr18596-3.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92459 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
| -rw-r--r-- | gcc/c-typeck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index b3f18727585..d2963b37454 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -4470,7 +4470,7 @@ start_init (tree decl, tree asmspec_tree ATTRIBUTE_UNUSED, int top_level) constructor_designated = 0; constructor_top_level = top_level; - if (decl != 0) + if (decl != 0 && decl != error_mark_node) { require_constant_value = TREE_STATIC (decl); require_constant_elements |

