diff options
| author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-29 15:35:06 +0000 |
|---|---|---|
| committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-29 15:35:06 +0000 |
| commit | 5e4e7e1fe9ec68cb0c7c875a02094584608eadff (patch) | |
| tree | 8ea05c7ef60941f9c7766cb14cac7bd1799d0418 | |
| parent | 142e7d2266aa0cbb521c9952b173f005244cb284 (diff) | |
| download | ppe42-gcc-5e4e7e1fe9ec68cb0c7c875a02094584608eadff.tar.gz ppe42-gcc-5e4e7e1fe9ec68cb0c7c875a02094584608eadff.zip | |
* cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
* class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
CLASSTYPE_ALIGN.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34252 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/cp/class.c | 2 | ||||
| -rw-r--r-- | gcc/cp/cp-tree.h | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 385f9211d9e..c1ef5fbd116 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2000-05-29 Mark Mitchell <mark@codesourcery.com> + + * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro. + * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not + CLASSTYPE_ALIGN. + 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com> * decl2.c (lang_decode_option): Use skip_leading_substring instead diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 57746ed51a9..be0a84a340b 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -3723,7 +3723,7 @@ layout_empty_base (binfo, eoc, binfo_offsets) /* This routine should only be used for empty classes. */ my_friendly_assert (is_empty_class (basetype), 20000321); - alignment = ssize_int (CLASSTYPE_ALIGN (basetype)); + alignment = ssize_int (CLASSTYPE_ALIGN_UNIT (basetype)); /* This is an empty base class. We first try to put it at offset zero. */ diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 347cde81e50..3c6fd956581 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -1637,6 +1637,10 @@ struct lang_type #define CLASSTYPE_SIZE_UNIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->size_unit) #define CLASSTYPE_ALIGN(NODE) (TYPE_LANG_SPECIFIC(NODE)->align) +/* The alignment of NODE, without its virtual bases, in bytes. */ +#define CLASSTYPE_ALIGN_UNIT(NODE) \ + (CLASSTYPE_ALIGN (NODE) / BITS_PER_UNIT) + /* A cons list of virtual functions which cannot be inherited by derived classes. When deriving from this type, the derived class must provide its own definition for each of these functions. */ |

