Commit 67729b99 by Brendan Kehoe

calls.c (expand_call): Check warn_inline before complaining about not being able to inline a fn...

        * calls.c (expand_call): Check warn_inline before complaining about
        not being able to inline a fn declared inline.
        * flags.h (warn_inline): Add extern decl.

From-SVN: r4171
parent 818913ea
......@@ -562,7 +562,8 @@ expand_call (exp, target, ignore)
Use abstraction instead of setting TREE_ADDRESSABLE
directly. */
if (DECL_INLINE (fndecl) && extra_warnings && !flag_no_inline)
if (DECL_INLINE (fndecl) && extra_warnings && warn_inline
&& !flag_no_inline)
warning_with_decl (fndecl, "can't inline call to `%s' which was declared inline");
mark_addressable (fndecl);
}
......
......@@ -73,6 +73,10 @@ extern int extra_warnings;
extern int warn_unused;
/* Nonzero means warn if inline function is too large. */
extern int warn_inline;
/* Nonzero to warn about variables used before they are initialized. */
extern int warn_uninitialized;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment