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: [C++ Patch] for c++/11750


On 08/13/2012 04:49 PM, Fabien Chêne wrote:
+	      /* Optimize away vtable lookup if we know that this
+		 function can't be overridden.  We need to check if
+		 the context and the instance type are the same,
+		 actually FN migth be defined in a different class

Typo: "might"


+		 type because of a using-declaration. In this case, we
+		 do not want to perform a non-virtual call.  */
  	      if (DECL_VINDEX (fn) && ! (flags & LOOKUP_NONVIRTUAL)
+		  && same_type_p (DECL_CONTEXT (fn), TREE_TYPE (instance))
  		  && resolves_to_fixed_type_p (instance, 0))

This should be same_type_ignoring_top_level_qualifiers_p.


OK with that change.

Jason


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