Hi,
> > +static tree
> > +handle_symver_attribute (tree *node, tree ARG_UNUSED (name), tree args,
> > +                    int ARG_UNUSED (flags), bool *no_add_attrs)
> > +{
> > +  tree symver;
> > +  const char *symver_str;
> > +
> > +  if (TREE_CODE (*node) != FUNCTION_DECL && TREE_CODE (*node) != VAR_DECL)
> 
> Should the attribute apply to member functions as well?  If not,
> FWIW, I think VAR_OR_FUNCTION_DECL_P() tests for just functions
> and variables.

I do not see particular reason why one would not want to create versions
of member functions.  So I guess i will keep it here.
> 
> > +    {
> > +      warning (OPT_Wattributes,
> > +          "%<symver%> attribute is only applicable on functions and "
> > +          "variables");
> 
> "applicable to functions" as below (though I think the far more
> common phrase among GCC messages is "applies to functions").

Thanks, I updated the wording.
> I'm not sure I understand what the above restriction means.  That
> "it's an error to define multiple versions of the same symbol?"

yes, though the thread with Jason suggestst that we may want to lift the
restriction and maek GCC to implicitly produce the aliases.

I have updated the patch.

Honza

Reply via email to