http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55742
--- Comment #29 from Jason Merrill <jason at gcc dot gnu.org> 2013-01-16 20:03:42 UTC --- (In reply to comment #25) > Anyway, with target("any") attribute, what would happen for > void foo () __attribute__((target ("avx"))); > void foo () __attribute__((target ("any"))); > void foo () {} > Is the definition "any", something else? The definition is an error, because it's ambiguous which version it's defining. (In reply to comment #28) > Further, if we have these three declarations in this order: > > void foo () __attribute__((target ("avx"))); > void foo () __attribute__((target ("sse4.2"))); > void foo () __attribute__((target ("any"))); > > This seems to mean that we want foo to be multi-versioned. However, when the > front-end is processing the second declaration, how would it decide between > merging or not without seeing the third? It would always declare a separate version. 4.7 doesn't actually merge target attributes, a later declaration just replaces the earlier target attribute; this seems like useless behavior to me that could be replaced with multiversioning semantics.