aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2005-02-25 23:20:48 +0000
committerJoseph Myers <joseph@codesourcery.com>2005-02-25 23:20:48 +0000
commit554323a58a34334bf31263429043896403e3a1b4 (patch)
tree3583a41269ae0a4769801c5116794c092decdc2a /gcc/c-decl.c
parent32b30b6ead31442cfd167448f75ce7c2cc37075b (diff)
* c-parser.c: New file.
* c-parse.in: Remove. * Makefile.in (c-parse.o-warn, c-parse.o, c-parse.c, c-parse.y): Remove. (c-parser.o): Add dependencies. (C_AND_OBJC_OBJC, C_OBJS, gcc.srcextra, GTFILES, distclean, maintainer-clean, TAGS): Update. * c-config-lang.in (gtfiles): Update. * gengtype-lex.l: Don't handle "@@". * stub-objc.c (objc_get_class_ivars, objc_build_throw_stmt, objc_build_synchronized, objc_begin_try_stmt, objc_begin_catch_clause, objc_finish_catch_clause, objc_build_finally_clause, objc_finish_try_stmt): New. * c-tree.h (struct c_declspecs): Add declspecs_seen_p and type_seen_p. (c_parse_init): Update comment. * c-decl.c (c_init_decl_processing): Update comment. (build_null_declspecs, declspecs_add_qual, declspecs_add_type, declspecs_add_scspec, declspecs_add_attrs): Initialize and update new c_declspecs members. objc: * Make-lang.in (objc/objc-parse.o-warn, objc/objc-parse.o, objc/objc-parse.c, objc/objc-parse.y): Remove (OBJC_OBJS, objc.srcextra, objc.tags, objc.mostlyclean, objc.distclean, objc.maintainer-clean): Update for new parser. * config-lang.in (gtfiles): Update for new parser. testsuite: * gcc.dg/cpp/separate-1.c, gcc.dg/noncompile/971104-1.c, gcc.dg/noncompile/990416-1.c: Adjust expected messages for new parser. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@95558 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 0b7b97ede23..690d3b3bc80 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2581,7 +2581,7 @@ c_init_decl_processing (void)
tree ptr_ftype_void, ptr_ftype_ptr;
location_t save_loc = input_location;
- /* Adds some ggc roots, and reserved words for c-parse.in. */
+ /* Initialize reserved words for parser. */
c_parse_init ();
current_function_decl = 0;
@@ -6746,6 +6746,8 @@ build_null_declspecs (void)
ret->attrs = 0;
ret->typespec_word = cts_none;
ret->storage_class = csc_none;
+ ret->declspecs_seen_p = false;
+ ret->type_seen_p = false;
ret->non_sc_seen_p = false;
ret->typedef_p = false;
ret->tag_defined_p = false;
@@ -6775,6 +6777,7 @@ declspecs_add_qual (struct c_declspecs *specs, tree qual)
enum rid i;
bool dupe = false;
specs->non_sc_seen_p = true;
+ specs->declspecs_seen_p = true;
gcc_assert (TREE_CODE (qual) == IDENTIFIER_NODE
&& C_IS_RESERVED_WORD (qual));
i = C_RID_CODE (qual);
@@ -6808,6 +6811,8 @@ declspecs_add_type (struct c_declspecs *specs, struct c_typespec spec)
{
tree type = spec.spec;
specs->non_sc_seen_p = true;
+ specs->declspecs_seen_p = true;
+ specs->type_seen_p = true;
if (TREE_DEPRECATED (type))
specs->deprecated_p = true;
@@ -7102,6 +7107,7 @@ declspecs_add_scspec (struct c_declspecs *specs, tree scspec)
enum rid i;
enum c_storage_class n = csc_none;
bool dupe = false;
+ specs->declspecs_seen_p = true;
gcc_assert (TREE_CODE (scspec) == IDENTIFIER_NODE
&& C_IS_RESERVED_WORD (scspec));
i = C_RID_CODE (scspec);
@@ -7184,6 +7190,7 @@ struct c_declspecs *
declspecs_add_attrs (struct c_declspecs *specs, tree attrs)
{
specs->attrs = chainon (attrs, specs->attrs);
+ specs->declspecs_seen_p = true;
return specs;
}