https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78666

--- Comment #6 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
On Thu, 8 Dec 2016, msebor at gcc dot gnu.org wrote:

> But what is specifying multiple declarations of the same function with
> different sets of attributes supposed to mean?  Is it supposed to apply the
> union of all of them?  How should conflicts be resolved?  Should the rules be
> expected to be consistent across attributes with different names?

It should be the result of merging them (taking the union), with conflicts 
diagnosed.  What conflicts depends on the attribute in question.  We have 
e.g. the comp_type_attributes hook for targets to use to detect conflicts 
(which x86 uses for regparm and other calling convention attributes).

Note that glibc relies on being able to apply both attributes (hidden 
visibility, at least) and asm renaming to built-in functions after their 
built-in and explicit declarations (see include/string.h).

Reply via email to