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: User directed Function Multiversioning via Function Overloading (issue5752064)


On 11/09/2012 08:33 PM, Sriraman Tallam wrote:
+	  /* Skip calling decls_match for versioned functions.  */
+          if (DECL_FUNCTION_VERSIONED (fn)
+	      && DECL_FUNCTION_VERSIONED (TREE_PURPOSE (match)))
+	    continue;
+	  if (!decls_match (fn, TREE_PURPOSE (match)))
+            break;

This seems like it would allow multiple versioned functions from different namespaces; I want to allow mismatches only if they are versions of the same function. I was thinking


for (match = TREE_CHAIN (matches); match; match = TREE_CHAIN (match))
if (!decls_match (fn, TREE_PURPOSE (match))
&& !targetm.target_option.function_versions (fn, TREE_PURPOSE (match)))
break;


+      error_at (input_location, "Call/Pointer to multiversioned function"
+                " without a default cannot be dispatched");

Let's just say "use of multiversioned function without a default".


Jason


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