Commit c966901c by Nathan Sidwell Committed by Nathan Sidwell

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
parent 5eec0563
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> 2000-04-12 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro. * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
......
...@@ -3668,9 +3668,9 @@ layout_empty_base (binfo, eoc, binfo_offsets) ...@@ -3668,9 +3668,9 @@ layout_empty_base (binfo, eoc, binfo_offsets)
} }
/* Build a FIELD_DECL for the base given by BINFO in the class /* 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 *BASE_ALIGN is a running maximum of the alignments of any base
*class. */ class. */
static void static void
build_base_field (rli, binfo, empty_p, base_align, v) build_base_field (rli, binfo, empty_p, base_align, v)
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#ifdef __cplusplus #ifdef __cplusplus
#include <typeinfo> #include <typeinfo>
// This should really be cstddef, but that currently is not available when
// building the runtime.
#include <stddef.h> #include <stddef.h>
namespace __cxxabiv1 namespace __cxxabiv1
...@@ -179,7 +181,11 @@ public: ...@@ -179,7 +181,11 @@ public:
bool __is_public_p () const bool __is_public_p () const
{ return vmi_offset_flags & public_mask; } { return vmi_offset_flags & public_mask; }
std::ptrdiff_t __offset () const 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 */ /* type information for a class */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment