* Jakub Jelinek:

> On Thu, Dec 15, 2016 at 07:11:09PM +0100, Florian Weimer wrote:
>> * Jakub Jelinek:
>> 
>> > +      if (lookup_attribute ("used", attributes) == NULL)
>> > +  attributes = tree_cons (get_identifier ("used"),  NULL, attributes);
>> 
>> Attribute “used” seems different to me from the rest.  Based on the
>> documentation, I wouldn't expect it to have any action-at-a-distance
>> effect, just that an out-of-line copy is always emitted.  It will
>> disable unused-function warnings, too, I think.
>
> "used" means the function may be used behind compiler's back in some other
> ways, so it sets DECL_PRESERVE_P which causes it not to be removed as
> unused, but also affects various other properties we want from the noipa
> functions.

Interesting.  And other aspects of the noipa attribute will not have
this effect already?

I still wish there was a way to achieve this, without affecting the
decision whether the function is emitted and disabling the unused
warning.

Reply via email to