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