+2002-07-31 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/7442
+ * libsupc++/cxxabi.h
+ (__base_class_info): Change to __base_class_type_info. 2.9.5p6c
+ (__base_class_info::__base): Change to __base_type. 2.9.5p6c
+ (__base_class_info::offset_shift): Change to __offset_shift. 2.9.5p6c
+ (__vmi_class_type_info::__base_info): Don't make const, of type
+ __base_class_type_info, as per 2.9.5p6c
+ (__pbase_type_info::__qualifier_flags): Change to __flags, as per
+ 2.9.5p7.
+ (__pbase_type_info::__qualifier_masks): Change to __masks, as per
+ 2.9.5p7.
+ (__pointer_to_member_type_info::__context_class): Change member to
+ __context, as per 2.9.5p9.
+ * libsupc++/tinfo2.cc (__pointer_catch): Change __context_class to
+ __context.
+ * libsupc++/tinfo2.cc (__do_catch): Change __qualifier_flags to
+ __flags.
+ * libsupc++/tinfo.cc (__do_find_public_src): Change __base to
+ __base_type.
+ * libsupc++/tinfo.cc (__do_dyncast): Same.
+ * libsupc++/tinfo.cc (__do_upcast): Same.
+
2002-07-31 Benjamin Kosnik <bkoz@redhat.com>
* src/fstream.cc: Add _GLIBCPP_USE_WCHAR_T guards.
// new abi support -*- C++ -*-
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
//
// This file is part of GNU CC.
//
{
/* abi defined member variables */
public:
- unsigned int __qualifier_flags; /* qualification of the target object */
+ unsigned int __flags; /* qualification of the target object */
const std::type_info *__pointee; /* type of pointed to object */
/* abi defined member functions */
explicit __pbase_type_info (const char *__n,
int __quals,
const std::type_info *__type)
- : std::type_info (__n), __qualifier_flags (__quals), __pointee (__type)
+ : std::type_info (__n), __flags (__quals), __pointee (__type)
{ }
/* implementation defined types */
public:
- enum __qualifier_masks {
+ enum __masks {
__const_mask = 0x1,
__volatile_mask = 0x2,
__restrict_mask = 0x4,
{
/* abi defined member variables */
public:
- __class_type_info *__context_class; /* class of the member */
+ __class_type_info *__context; /* class of the member */
/* abi defined member functions */
public:
int __quals,
const std::type_info *__type,
__class_type_info *__klass)
- : __pbase_type_info (__n, __quals, __type), __context_class (__klass)
+ : __pbase_type_info (__n, __quals, __type), __context (__klass)
{ }
/* implementation defined member functions */
class __class_type_info;
/* helper class for __vmi_class_type */
-class __base_class_info
+class __base_class_type_info
{
/* abi defined member variables */
public:
- const __class_type_info *__base; /* base class type */
+ const __class_type_info* __base_type; /* base class type */
long __offset_flags; /* offset and info */
/* implementation defined types */
__virtual_mask = 0x1,
__public_mask = 0x2,
hwm_bit = 2,
- offset_shift = 8 /* bits to shift offset by */
+ __offset_shift = 8 /* bits to shift offset by */
};
/* implementation defined member functions */
{
// This shift, being of a signed type, is implementation defined. GCC
// implements such shifts as arithmetic, which is what we want.
- return static_cast<__PTRDIFF_TYPE__> (__offset_flags) >> offset_shift;
+ return static_cast<__PTRDIFF_TYPE__> (__offset_flags) >> __offset_shift;
}
};
/* publicly) */
__contained_ambig, /* contained ambiguously */
- __contained_virtual_mask = __base_class_info::__virtual_mask, /* via a virtual path */
- __contained_public_mask = __base_class_info::__public_mask, /* via a public path */
- __contained_mask = 1 << __base_class_info::hwm_bit, /* contained within us */
+ __contained_virtual_mask = __base_class_type_info::__virtual_mask, /* via a virtual path */
+ __contained_public_mask = __base_class_type_info::__public_mask, /* via a public path */
+ __contained_mask = 1 << __base_class_type_info::hwm_bit, /* contained within us */
__contained_private = __contained_mask,
__contained_public = __contained_mask | __contained_public_mask
public:
unsigned int __flags; /* details about the class hierarchy */
unsigned int __base_count; /* number of direct bases */
- __base_class_info const __base_info[1]; /* array of bases */
+ __base_class_type_info __base_info[1]; /* array of bases */
/* The array of bases uses the trailing array struct hack
so this class is not constructable with a normal constructor. It is
internally generated by the compiler. */
}
base = convert_to_base (base, is_virtual, offset);
- __sub_kind base_kind = __base_info[i].__base->__do_find_public_src
+ __sub_kind base_kind = __base_info[i].__base_type->__do_find_public_src
(src2dst, base, src_type, src_ptr);
if (contained_p (base_kind))
{
}
bool result2_ambig
- = __base_info[i].__base->__do_dyncast (src2dst, base_access,
+ = __base_info[i].__base_type->__do_dyncast (src2dst, base_access,
dst_type, base,
src_type, src_ptr, result2);
result.whole2src = __sub_kind (result.whole2src | result2.whole2src);
if (base)
base = convert_to_base (base, is_virtual, offset);
- if (__base_info[i].__base->__do_upcast (dst, base, result2))
+ if (__base_info[i].__base_type->__do_upcast (dst, base, result2))
{
if (result2.base_type == nonvirtual_base_type && is_virtual)
- result2.base_type = __base_info[i].__base;
+ result2.base_type = __base_info[i].__base_type;
if (contained_p (result2.part2dst) && !is_public)
result2.part2dst = __sub_kind (result2.part2dst & ~__contained_public_mask);
// Methods for type_info for -*- C++ -*- Run Time Type Identification.
-// Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001
+// Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002
// Free Software Foundation
//
// This file is part of GNU CC.
const __pbase_type_info *thrown_type =
static_cast <const __pbase_type_info *> (thr_type);
- if (thrown_type->__qualifier_flags & ~__qualifier_flags)
+ if (thrown_type->__flags & ~__flags)
// We're less qualified.
return false;
- if (!(__qualifier_flags & __const_mask))
+ if (!(__flags & __const_mask))
outer &= ~1;
return __pointer_catch (thrown_type, thr_obj, outer);
const __pointer_to_member_type_info *thrown_type =
static_cast <const __pointer_to_member_type_info *> (thr_type);
- if (*__context_class != *thrown_type->__context_class)
+ if (*__context != *thrown_type->__context)
return false; // not pointers to member of same class
return __pbase_type_info::__pointer_catch (thrown_type, thr_obj, outer);