summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-03-19 11:56:54 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-03-19 11:56:54 +0000
commit45c101572da6738938cfac241fae008ee5e97f76 (patch)
tree5b367fa41f0f7094931b1bfcc16cb0634cebb708 /gcc
parent2d31a7a64eb143f601f93fc7ae67d2cd80a3ad00 (diff)
downloadgcc-45c101572da6738938cfac241fae008ee5e97f76.tar.gz
* stor-layout.c (layout_decl): Don't abort on any zero sized decl.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32638 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/stor-layout.c11
2 files changed, 2 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 864d4b5555f..222701aadd8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -7,6 +7,8 @@
* fold-const.c (extract_muldiv): Apply type check for defined
overflow to multiply as well as divide.
+ * stor-layout.c (layout_decl): Don't abort on any zero sized decl.
+
2000-03-18 Mark Mitchell <mark@codesourcery.com>
* emit-rtl.c (remove_unncessary_notes): Check that all
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 62363cbbde0..690ec365ea4 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -308,17 +308,6 @@ layout_decl (decl, known_align)
{
HOST_WIDE_INT spec_size;
- /* The front-end may set the explicit width of the field, so its
- size may not be the same as the size of its type. This happens
- with bitfields, of course (an `int' bitfield may be only 2 bits,
- say), but it also happens with other fields. For example, the
- C++ front-end creates zero-sized fields corresponding to empty
- base classes, and depends on layout_type setting
- DECL_FIELD_BITPOS correctly for the field. */
- if (integer_zerop (DECL_SIZE (decl))
- && DECL_NAME (decl) != NULL_TREE)
- abort ();
-
/* Size is specified in number of bits. */
spec_size = TREE_INT_CST_LOW (DECL_SIZE (decl));
if (spec_size % BITS_PER_UNIT == 0)