diff options
author | Ian Lance Taylor <iant@google.com> | 2009-06-19 15:29:18 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2009-06-19 15:29:18 +0000 |
commit | dc491a250a946a50bdea3813e9f1f67d368e348b (patch) | |
tree | 0dea9b2fb4eca6aa396f8ba7b9c2513061e504ae /gcc/objc | |
parent | 88eeff6f5a1347dc09de33c26a68648c4dea7f80 (diff) | |
download | gcc-dc491a250a946a50bdea3813e9f1f67d368e348b.zip gcc-dc491a250a946a50bdea3813e9f1f67d368e348b.tar.gz gcc-dc491a250a946a50bdea3813e9f1f67d368e348b.tar.bz2 |
dse.c (struct store_info): Rename bitmap field to bmap.
./: * 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.
From-SVN: r148709
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 8 |
2 files changed, 11 insertions, 5 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 2fe4b25..426a6a8 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,11 @@ +2009-06-19 Ian Lance Taylor <iant@google.com> + + * 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. + 2009-06-15 Ian Lance Taylor <iant@google.com> * objc-act.c (objc_start_function): Don't set diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index f114b65..b6a01ed 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -420,8 +420,7 @@ static int generating_instance_variables = 0; is compiled as part of obj-c++. */ static bool objc_building_struct; -static bool objc_in_struct ATTRIBUTE_UNUSED; -static VEC(tree,heap) *objc_struct_types ATTRIBUTE_UNUSED; +static struct c_struct_parse_info *objc_struct_info ATTRIBUTE_UNUSED; /* Start building a struct for objc. */ @@ -430,8 +429,7 @@ objc_start_struct (tree name) { gcc_assert (!objc_building_struct); objc_building_struct = true; - return start_struct (input_location, RECORD_TYPE, - name, &objc_in_struct, &objc_struct_types); + return start_struct (input_location, RECORD_TYPE, name, &objc_struct_info); } /* Finish building a struct for objc. */ @@ -442,7 +440,7 @@ objc_finish_struct (tree type, tree fieldlist) gcc_assert (objc_building_struct); objc_building_struct = false; return finish_struct (input_location, type, fieldlist, NULL_TREE, - objc_in_struct, objc_struct_types); + objc_struct_info); } /* Some platforms pass small structures through registers versus |