This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [csl-arm] Revise __cxa_type_match


On Wed, 17 Nov 2004 14:00:20 +0000, Nathan Sidwell <nathan@codesourcery.com> wrote:

> Paul Brook wrote:
>> On Wednesday 17 November 2004 10:39, Nathan Sidwell wrote:
>>
>>>Paul Brook wrote:
>>>
>>>>+ if (typeid(*catch_type) == typeid (typeid(void*)))
>>>>+ {
>>>>+   const __pointer_type_info *catch_pointer_type =
>>>>+     static_cast<const __pointer_type_info *> (catch_type);
>>>>+   const __pointer_type_info *throw_pointer_type =
>>>>+     static_cast<const __pointer_type_info *> (throw_type);
>>>>+
>>>>+   if (typeid (*catch_pointer_type->__pointee) != typeid (void)
>>>>+       && (*catch_pointer_type->__pointee !=
>>>>+          *throw_pointer_type->__pointee))
>>>>+     return ctm_succeeded_with_ptr_to_base;

I imagine this contribution has been resolved already, but this sort of
thing is properly written

if (const __pointer_type_info *catch_pointer_type
    = dynamic_cast <const __pointer_type_info *>(catch_type))
  ...

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]