Commit 0481a55e by Richard Kenner

(expand_call): Don't require both -W and -Winline to say that call can't be inlined.

(expand_call): Don't require both -W and -Winline to say that call can't be
inlined.
Warn if inlining is tried but fails.

From-SVN: r6905
parent 253245df
...@@ -581,9 +581,8 @@ expand_call (exp, target, ignore) ...@@ -581,9 +581,8 @@ expand_call (exp, target, ignore)
Use abstraction instead of setting TREE_ADDRESSABLE Use abstraction instead of setting TREE_ADDRESSABLE
directly. */ directly. */
if (DECL_INLINE (fndecl) && extra_warnings && warn_inline if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline)
&& !flag_no_inline) warning_with_decl (fndecl, "can't inline call to `%s'");
warning_with_decl (fndecl, "can't inline call to `%s' which was declared inline");
mark_addressable (fndecl); mark_addressable (fndecl);
} }
...@@ -746,7 +745,11 @@ expand_call (exp, target, ignore) ...@@ -746,7 +745,11 @@ expand_call (exp, target, ignore)
} }
/* If inlining failed, mark FNDECL as needing to be compiled /* If inlining failed, mark FNDECL as needing to be compiled
separately after all. */ separately after all. If function was declared inline,
give a warning. */
if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline
&& ! TREE_ADDRESSABLE (fndecl))
warning_with_decl (fndecl, "can't inline call to `%s'");
mark_addressable (fndecl); mark_addressable (fndecl);
} }
......
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