From: Richard Kenner Date: Sun, 31 Dec 1995 20:00:12 +0000 (-0500) Subject: (expand_call): Don't warn about not being able to inline if -O0. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da8c1713212772aad1bf1a701bb72c08e105b11e;p=gcc.git (expand_call): Don't warn about not being able to inline if -O0. From-SVN: r10913 --- diff --git a/gcc/calls.c b/gcc/calls.c index ad05be4f7c0..b98f73016b0 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -618,7 +618,8 @@ expand_call (exp, target, ignore) Use abstraction instead of setting TREE_ADDRESSABLE directly. */ - if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline) + if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline + && optimize > 0) { warning_with_decl (fndecl, "can't inline call to `%s'"); warning ("called from here"); @@ -798,7 +799,7 @@ expand_call (exp, target, ignore) separately after all. If function was declared inline, give a warning. */ if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline - && ! TREE_ADDRESSABLE (fndecl)) + && optimize > 0 && ! TREE_ADDRESSABLE (fndecl)) { warning_with_decl (fndecl, "inlining failed in call to `%s'"); warning ("called from here");