diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-27 09:05:45 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-27 09:05:45 +0000 |
commit | 4862d777da0da56f4bc76208e67305b4c5e7df27 (patch) | |
tree | a45098d02265b935900487928cee37f19d7a97d5 /gcc/c-parse.in | |
parent | 36bcb738883bca27b122874e065301e98c98c0a8 (diff) | |
download | gcc-4862d777da0da56f4bc76208e67305b4c5e7df27.tar.gz |
* c-tree.h (grokfield): Remove unused filename and line parameters.
* c-decl.c (grokfield): Remove unused filename and line parameters.
* c-parse.in (component_decl): Adjust field grokking rules, adjust
grokfield calls.
(component_declarator): Likewise.
(component_notype_declarator): Likewise.
* objc/objc-act.c (build_module_descriptor): Adjust grokfield
calls.
(build_protocol_template, build_method_prototype_list_template,
build_method_prototype_template, build_category_template,
build_selector_template, build_class_template,
build_super_template, build_ivar_template,
build_ivar_list_template, build_method_list_template,
build_method_template, add_instance_variable): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68560 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parse.in')
-rw-r--r-- | gcc/c-parse.in | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 477ae629fe7..ae8545366b0 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -1862,7 +1862,7 @@ component_decl: declspecs_nosc_ts setspecs components { $$ = $3; POP_DECLSPEC_STACK; } - | declspecs_nosc_ts setspecs save_filename save_lineno + | declspecs_nosc_ts setspecs { /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports @@ -1870,7 +1870,7 @@ component_decl: if (pedantic) pedwarn ("ISO C doesn't support unnamed structs/unions"); - $$ = grokfield($3, $4, NULL, current_declspecs, NULL_TREE); + $$ = grokfield(NULL, current_declspecs, NULL_TREE); POP_DECLSPEC_STACK; } | declspecs_nosc_nots setspecs components_notype { $$ = $3; @@ -1900,29 +1900,33 @@ components_notype: ; component_declarator: - save_filename save_lineno declarator maybe_attribute - { $$ = grokfield ($1, $2, $3, current_declspecs, NULL_TREE); - decl_attributes (&$$, chainon ($4, all_prefix_attributes), 0); } - | save_filename save_lineno - declarator ':' expr_no_commas maybe_attribute - { $$ = grokfield ($1, $2, $3, current_declspecs, $5); - decl_attributes (&$$, chainon ($6, all_prefix_attributes), 0); } - | save_filename save_lineno ':' expr_no_commas maybe_attribute - { $$ = grokfield ($1, $2, NULL_TREE, current_declspecs, $4); - decl_attributes (&$$, chainon ($5, all_prefix_attributes), 0); } + declarator maybe_attribute + { $$ = grokfield ($1, current_declspecs, NULL_TREE); + decl_attributes (&$$, + chainon ($2, all_prefix_attributes), 0); } + | declarator ':' expr_no_commas maybe_attribute + { $$ = grokfield ($1, current_declspecs, $3); + decl_attributes (&$$, + chainon ($4, all_prefix_attributes), 0); } + | ':' expr_no_commas maybe_attribute + { $$ = grokfield (NULL_TREE, current_declspecs, $2); + decl_attributes (&$$, + chainon ($3, all_prefix_attributes), 0); } ; component_notype_declarator: - save_filename save_lineno notype_declarator maybe_attribute - { $$ = grokfield ($1, $2, $3, current_declspecs, NULL_TREE); - decl_attributes (&$$, chainon ($4, all_prefix_attributes), 0); } - | save_filename save_lineno - notype_declarator ':' expr_no_commas maybe_attribute - { $$ = grokfield ($1, $2, $3, current_declspecs, $5); - decl_attributes (&$$, chainon ($6, all_prefix_attributes), 0); } - | save_filename save_lineno ':' expr_no_commas maybe_attribute - { $$ = grokfield ($1, $2, NULL_TREE, current_declspecs, $4); - decl_attributes (&$$, chainon ($5, all_prefix_attributes), 0); } + notype_declarator maybe_attribute + { $$ = grokfield ($1, current_declspecs, NULL_TREE); + decl_attributes (&$$, + chainon ($2, all_prefix_attributes), 0); } + | notype_declarator ':' expr_no_commas maybe_attribute + { $$ = grokfield ($1, current_declspecs, $3); + decl_attributes (&$$, + chainon ($4, all_prefix_attributes), 0); } + | ':' expr_no_commas maybe_attribute + { $$ = grokfield (NULL_TREE, current_declspecs, $2); + decl_attributes (&$$, + chainon ($3, all_prefix_attributes), 0); } ; /* We chain the enumerators in reverse order. |