On Tue, Apr 19, 2011 at 1:06 PM, Eric Botcazou <ebotca...@adacore.com> wrote:
> Hi,
>
> tree_inlinable_function_p issues the -Winline warning only if
>
>  /* We only warn for functions declared `inline' by the user.  */
>  do_warning = (warn_inline
>                && DECL_DECLARED_INLINE_P (fn)
>                && !DECL_NO_INLINE_WARNING_P (fn)
>                && !DECL_IN_SYSTEM_HEADER (fn));
>
> is true, so in particular only if DECL_NO_INLINE_WARNING_P is not set.  Now
> expand_call_inline also issues the -Winline warning
>
>      else if (warn_inline && DECL_DECLARED_INLINE_P (fn)
>               && !DECL_IN_SYSTEM_HEADER (fn)
>               && reason != CIF_UNSPECIFIED
>               && !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn))
>               /* Do not warn about not inlined recursive calls.  */
>               && !cgraph_edge_recursive_p (cg_edge)
>               /* Avoid warnings during early inline pass. */
>               && cgraph_global_info_ready)
>
> but disregards the DECL_NO_INLINE_WARNING_P flag.
>
> Tested on i586-suse-linux, OK for the mainline?

Ok.

Thanks,
Richard.

>
> 2011-04-19  Eric Botcazou  <ebotca...@adacore.com>
>
>        * tree-inline.c (expand_call_inline): Do not issue a -Winline warning
>        if DECL_NO_INLINE_WARNING_P is set on the function.
>
>
> --
> Eric Botcazou
>

Reply via email to