aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-tree.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2009-06-19 15:29:18 +0000
committerIan Lance Taylor <iant@google.com>2009-06-19 15:29:18 +0000
commitdf22ec4451a67ae562e508b659ac17b3bee42aba (patch)
tree0dea9b2fb4eca6aa396f8ba7b9c2513061e504ae /gcc/c-tree.h
parent6bb4514ccc5f483134b4dc60eacdab3056b48272 (diff)
./:
* dse.c (struct store_info): Rename bitmap field to bmap. Change all uses. * c-decl.c (in_struct, struct_types): Remove. (struct c_binding): Add in_struct field. (c_binding_ptr): Define type, along with VEC. (struct c_struct_parse_info): Define. (struct_parse_info): New static variable. (bind): Initialize in_struct field. (start_struct): Remove enclosing_in_struct and enclosing_struct_types parameters. Add enclosing_struct_parse_info parameter. Change all callers. Set struct_parse_info rather than in_struct and struct_types. (grokfield): If -Wc++-compat and there is a symbol binding for the field name, set the in_struct flag and push it on the struct_parse_info->fields vector. (warn_cxx_compat_finish_struct): New static function. (finish_struct): Remove enclosing_in_struct and enclosing_struct_types parameters. Add enclosing_struct_parse_info parameter. Change all callers. Don't set C_TYPE_DEFINED_IN_STRUCT here. Call warn_cxx_compat_finish_struct. Free struct_parse_info and set to parameter. Only push on struct_types if warn_cxx_compat. (finish_enum): Only push on struct_types if warn_cxx_compat. (declspecs_add_type): Add loc parameter. Change all callers. Change all error calls to error_at. Pass loc, not input_location, to pedwarn calls. Warn if -Wc++-compat and a typedef name is defined in a struct. If -Wc++-compat and parsing a struct, record that a typedef name was used. * c-parser.c (c_parser_declspecs): Get location to pass to declspecs_add_type. (c_parser_struct_or_union_specifier): Update calls to start_struct and finish_struct. * c-tree.h (struct c_struct_parse_info): Declare. (finish_struct, start_struct): Update declarations. (declspecs_add_type): Update declaration. objc/: * objc-act.c (objc_in_struct, objc_struct_types): Remove. (objc_struct_info): New static variable. (objc_start_struct): Pass &objc_struct_info, not &objc_in_struct and &objc_struct_types, to start_struct. (objc_finish_struct): Likewise for finish_struct. objcp/: * objcp-decl.h (start_struct): Remove in_struct and struct_types parameters. Add struct_info parameter. (finish_struct): Likewise. testsuite/: * gcc.dg/Wcxx-compat-15.c: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@148709 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-tree.h')
-rw-r--r--gcc/c-tree.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index f565df58f31..9d3d2f30da0 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -430,6 +430,7 @@ extern void gen_aux_info_record (tree, int, int, int);
/* in c-decl.c */
struct c_spot_bindings;
+struct c_struct_parse_info;
extern struct obstack parser_obstack;
extern tree c_break_label;
extern tree c_cont_label;
@@ -465,7 +466,8 @@ extern void c_maybe_initialize_eh (void);
extern void finish_decl (tree, location_t, tree, tree, tree);
extern tree finish_enum (tree, tree, tree);
extern void finish_function (void);
-extern tree finish_struct (location_t, tree, tree, tree, bool, VEC(tree,heap) *);
+extern tree finish_struct (location_t, tree, tree, tree,
+ struct c_struct_parse_info *);
extern struct c_arg_info *get_parm_info (bool);
extern tree grokfield (location_t, struct c_declarator *,
struct c_declspecs *, tree, tree *);
@@ -487,7 +489,8 @@ extern tree start_enum (location_t, struct c_enum_contents *, tree);
extern int start_function (struct c_declspecs *, struct c_declarator *, tree);
extern tree start_decl (struct c_declarator *, struct c_declspecs *, bool,
tree);
-extern tree start_struct (location_t, enum tree_code, tree, bool *, VEC(tree,heap) **);
+extern tree start_struct (location_t, enum tree_code, tree,
+ struct c_struct_parse_info **);
extern void store_parm_decls (void);
extern void store_parm_decls_from (struct c_arg_info *);
extern tree xref_tag (enum tree_code, tree);
@@ -504,7 +507,8 @@ extern struct c_declarator *make_pointer_declarator (struct c_declspecs *,
struct c_declarator *);
extern struct c_declspecs *build_null_declspecs (void);
extern struct c_declspecs *declspecs_add_qual (struct c_declspecs *, tree);
-extern struct c_declspecs *declspecs_add_type (struct c_declspecs *,
+extern struct c_declspecs *declspecs_add_type (location_t,
+ struct c_declspecs *,
struct c_typespec);
extern struct c_declspecs *declspecs_add_scspec (struct c_declspecs *, tree);
extern struct c_declspecs *declspecs_add_attrs (struct c_declspecs *, tree);