aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde+gcc@tbsaunde.org>2016-07-13 02:43:17 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2016-07-13 02:43:17 +0000
commitbf4fa671812c5e616c3cea5702d4ddcdf7a47d18 (patch)
treea6ab7fefda3c4ab4f7d539f7e4e6603bb63ba850 /gcc
parent74ea4cd5e3ecffdfbd50e2a03eac903d1c46900c (diff)
downloadgcc-bf4fa671812c5e616c3cea5702d4ddcdf7a47d18.zip
gcc-bf4fa671812c5e616c3cea5702d4ddcdf7a47d18.tar.gz
gcc-bf4fa671812c5e616c3cea5702d4ddcdf7a47d18.tar.bz2
c-decl.c: add [cd]tors to c_struct_parse_info
gcc/c/ChangeLog: 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * c-decl.c (struct c_struct_parse_info): Change member types from vec to auto_vec. (start_struct): Adjust. (finish_struct): Likewise. From-SVN: r238279
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c/ChangeLog7
-rw-r--r--gcc/c/c-decl.c16
2 files changed, 12 insertions, 11 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 41d3547..59b296c 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,10 @@
+2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * c-decl.c (struct c_struct_parse_info): Change member types
+ from vec to auto_vec.
+ (start_struct): Adjust.
+ (finish_struct): Likewise.
+
2016-07-02 Jakub Jelinek <jakub@redhat.com>
PR c/71719
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index 8b966fe..c173796 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -574,15 +574,15 @@ struct c_struct_parse_info
{
/* If warn_cxx_compat, a list of types defined within this
struct. */
- vec<tree> struct_types;
+ auto_vec<tree> struct_types;
/* If warn_cxx_compat, a list of field names which have bindings,
and which are defined in this struct, but which are not defined
in any enclosing struct. This is used to clear the in_struct
field of the c_bindings structure. */
- vec<c_binding_ptr> fields;
+ auto_vec<c_binding_ptr> fields;
/* If warn_cxx_compat, a list of typedef names used when defining
fields in this struct. */
- vec<tree> typedefs_seen;
+ auto_vec<tree> typedefs_seen;
};
/* Information for the struct or union currently being parsed, or
@@ -7443,10 +7443,7 @@ start_struct (location_t loc, enum tree_code code, tree name,
TYPE_PACKED (v) = flag_pack_struct;
*enclosing_struct_parse_info = struct_parse_info;
- struct_parse_info = XNEW (struct c_struct_parse_info);
- struct_parse_info->struct_types.create (0);
- struct_parse_info->fields.create (0);
- struct_parse_info->typedefs_seen.create (0);
+ struct_parse_info = new c_struct_parse_info ();
/* FIXME: This will issue a warning for a use of a type defined
within a statement expr used within sizeof, et. al. This is not
@@ -8088,10 +8085,7 @@ finish_struct (location_t loc, tree t, tree fieldlist, tree attributes,
if (warn_cxx_compat)
warn_cxx_compat_finish_struct (fieldlist, TREE_CODE (t), loc);
- struct_parse_info->struct_types.release ();
- struct_parse_info->fields.release ();
- struct_parse_info->typedefs_seen.release ();
- XDELETE (struct_parse_info);
+ delete struct_parse_info;
struct_parse_info = enclosing_struct_parse_info;