diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2010-11-14 13:10:41 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2010-11-14 13:10:41 +0000 |
commit | a5812bdc55ed682d3dbc166cddd273f4edea0b0b (patch) | |
tree | 4e246b3e80d5dc1a3504b96a42dad8946d9320d6 /gcc/c-decl.c | |
parent | ae788515d2b28952fdee5a83b010667dc9285732 (diff) | |
download | gcc-a5812bdc55ed682d3dbc166cddd273f4edea0b0b.zip gcc-a5812bdc55ed682d3dbc166cddd273f4edea0b0b.tar.gz gcc-a5812bdc55ed682d3dbc166cddd273f4edea0b0b.tar.bz2 |
re PR c/46462 (Revision 166700 caused new C test failures)
2010-11-13 Paolo Bonzini <bonzini@gnu.org>
PR c/46462
* c-decl.c (declspecs_add_type): Make variables with error types
integers.
* c-parser.c (c_parser_next_tokens_start_declaration): Two IDs
do not start a declaration before an Objective-C foreach.
(c_parser_declaration_or_fndef): Improve recovery after unknown
type name.
(c_parser_for_statement): Hoist entrance of "foreach context"
before ifs, add corresponding reset where it was missing. Do
not set objc_could_be_foreach_context for C.
From-SVN: r166732
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index c0d5a49..bab402d 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -9324,6 +9324,11 @@ declspecs_add_type (location_t loc, struct c_declspecs *specs, } specs->type = type; } + else + { + /* Set a dummy type here to avoid warning about implicit 'int'. */ + specs->type = integer_type_node; + } return specs; } |