On Mon, 22 Oct 2018, Martin Sebor wrote:

> between aliases and ifunc resolvers.  With -Wattribute-alias=1
> that reduced the number of unique instances of the warnings for
> a Glibc build to just 27.  Of those, all but one of
> the -Wattributes instances are of the form:
> 
>   warning: ‘leaf’ attribute has no effect on unit local functions

What do the macro expansions look like there?  All the places where you're 
adding "copy" attributes are for extern declarations, not static ones, 
whereas your list of warnings seems to indicate this is appearing for 
ifunc resolvers (which are static, but should not be copying attributes 
from anywhere).

> All the -Wmissing-attributes instances are due to a missing
> nonnull attribute on the __EI__ kinds of functions, like:
> 
>   warning: ‘__EI_vfprintf’ specifies less restrictive attribute than its
> target ‘vfprintf’: ‘nonnull’

That looks like a bug in the GCC patch to me; you appear to be adding copy 
attributes in the correct place.  Note that __EI_* gets declared twice 
(first with __asm__, second with an alias attribute), so anything related 
to handling of such duplicate declarations might be a cause for such a 
bug (and an indication of what you need to add a test for when fixing such 
a bug).

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to