diff options
| -rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/cp/class.c | 4 | ||||
| -rw-r--r-- | gcc/cp/inc/cxxabi.h | 8 |
3 files changed, 16 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8ebc5ae..19b5e4e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2000-04-13 Nathan Sidwell <nathan@codesourcery.com> + + * class.c (build_base_field): Reformat comment. + + * inc/cxxabi.h (stddef.h): Comment inclusion. + (__base_class_info::__offset): Comment shift. + 2000-04-12 Mark Mitchell <mark@codesourcery.com> * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index f0a84f8..e89c733 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -3668,9 +3668,9 @@ layout_empty_base (binfo, eoc, binfo_offsets) } /* Build a FIELD_DECL for the base given by BINFO in the class - *indicated by RLI. If the new object is non-empty, clear *EMPTY_P. + indicated by RLI. If the new object is non-empty, clear *EMPTY_P. *BASE_ALIGN is a running maximum of the alignments of any base - *class. */ + class. */ static void build_base_field (rli, binfo, empty_p, base_align, v) diff --git a/gcc/cp/inc/cxxabi.h b/gcc/cp/inc/cxxabi.h index a40482c..56c07d5 100644 --- a/gcc/cp/inc/cxxabi.h +++ b/gcc/cp/inc/cxxabi.h @@ -24,6 +24,8 @@ #ifdef __cplusplus #include <typeinfo> +// This should really be cstddef, but that currently is not available when +// building the runtime. #include <stddef.h> namespace __cxxabiv1 @@ -179,7 +181,11 @@ public: bool __is_public_p () const { return vmi_offset_flags & public_mask; } std::ptrdiff_t __offset () const - { return std::ptrdiff_t (vmi_offset_flags) >> offset_shift; } + { + // This shift, being of a signed type, is implementation defined. GCC + // implements such shifts as arithmetic, which is what we want. + return std::ptrdiff_t (vmi_offset_flags) >> offset_shift; + } }; /* type information for a class */ |
