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


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;

How is this return statement reachable? If catch_type is a pointer to void, how can the type of the thing it points to _not_ be void?

nathan
--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



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