aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>1999-03-24 03:01:03 +0000
committerMartin v. Löwis <loewis@gcc.gnu.org>1999-03-24 03:01:03 +0000
commit5c6e1aa14a61ca464c1f00ba166b40a16465007e (patch)
tree803987c2b2daea48b322a691f420a7b2232491c6 /gcc/cp
parent9747e84add3340a5be5ba3efcc3d2c75377dd5f8 (diff)
downloadgcc-5c6e1aa14a61ca464c1f00ba166b40a16465007e.zip
gcc-5c6e1aa14a61ca464c1f00ba166b40a16465007e.tar.gz
gcc-5c6e1aa14a61ca464c1f00ba166b40a16465007e.tar.bz2
* class.c (finish_struct_1): Always reset TYPE_FIELDS for empty classes.
From-SVN: r25944
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/class.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 4a28e4b..820923d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
+
+ * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
+ classes.
+
1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (lookup_name_real): Do nested field lookup regardless of
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 07f8f97..4306f14 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -3985,7 +3985,7 @@ finish_struct_1 (t, warn_anon)
if (n_baseclasses)
/* layout_basetypes will remove the base subobject fields. */
max_has_virtual = layout_basetypes (t, max_has_virtual);
- else if (empty)
+ if (empty)
TYPE_FIELDS (t) = fields;
my_friendly_assert (TYPE_FIELDS (t) == fields, 981117);