aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/inc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-04-13 11:14:29 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-04-13 11:14:29 +0000
commitc966901c242442c6ca4d34c8cdc85f5dfd3dbdd3 (patch)
tree4498ffd27452d510805354348579d1f937fddc09 /gcc/cp/inc
parent5eec0563bbf419e126406df1fcc48ffd11d34279 (diff)
downloadgcc-c966901c242442c6ca4d34c8cdc85f5dfd3dbdd3.zip
gcc-c966901c242442c6ca4d34c8cdc85f5dfd3dbdd3.tar.gz
gcc-c966901c242442c6ca4d34c8cdc85f5dfd3dbdd3.tar.bz2
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
Diffstat (limited to 'gcc/cp/inc')
-rw-r--r--gcc/cp/inc/cxxabi.h8
1 files changed, 7 insertions, 1 deletions
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 */