From c966901c242442c6ca4d34c8cdc85f5dfd3dbdd3 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Thu, 13 Apr 2000 11:14:29 +0000 Subject: [PATCH] class.c (build_base_field): Reformat comment. * class.c (build_base_field): Reformat comment. * inc/cxxabi.h (stddef.h): Comment inclusion. (__base_class_info::__offset): Comment shift. From-SVN: r33137 --- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/class.c | 4 ++-- gcc/cp/inc/cxxabi.h | 8 +++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8ebc5ae217f..19b5e4ecfeb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2000-04-13 Nathan Sidwell + + * 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 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index f0a84f83221..e89c733dcd4 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 a40482cb15a..56c07d5cdd8 100644 --- a/gcc/cp/inc/cxxabi.h +++ b/gcc/cp/inc/cxxabi.h @@ -24,6 +24,8 @@ #ifdef __cplusplus #include +// This should really be cstddef, but that currently is not available when +// building the runtime. #include 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 */ -- 2.30.2