On Sun, Mar 30, 2014 at 9:25 PM, Richard Sandiford <rdsandif...@googlemail.com> wrote: > Marek Polacek <pola...@redhat.com> writes: >> @@ -6666,7 +6666,16 @@ handle_noinline_attribute (tree *node, tree name, >> int ARG_UNUSED (flags), bool *no_add_attrs) >> { >> if (TREE_CODE (*node) == FUNCTION_DECL) >> - DECL_UNINLINABLE (*node) = 1; >> + { >> + if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (*node))) >> + { >> + warning (OPT_Wattributes, "%qE attribute ignored due to conflict " >> + "with %<always_inline%> attribute", name); >> + *no_add_attrs = true; >> + } >> + else >> + DECL_UNINLINABLE (*node) = 1; >> + } >> else >> { >> warning (OPT_Wattributes, "%qE attribute ignored", name); >> @@ -6704,9 +6713,16 @@ handle_always_inline_attribute (tree *node, tree name, >> { >> if (TREE_CODE (*node) == FUNCTION_DECL) >> { >> - /* Set the attribute and mark it for disregarding inline >> - limits. */ >> - DECL_DISREGARD_INLINE_LIMITS (*node) = 1; >> + if (lookup_attribute ("noinline", DECL_ATTRIBUTES (*node))) >> + { >> + warning (OPT_Wattributes, "%qE attribute ignored due to conflict " >> + "with %<noinline%> attribute", name); > > Sorry for the nit, but maybe it'd be better to use %qs for the second > attributes, so that we can use the same translation string for all conflicts. > Same with the later messages (where the quotes that come with %qs are > probably needed too).
Good point, patch is pre-approved (also adjusting the two other conflict warnings to spell out that the attribute is ignored). Thanks, Richard. > Thanks, > Richard