From da8c1713212772aad1bf1a701bb72c08e105b11e Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sun, 31 Dec 1995 15:00:12 -0500 Subject: (expand_call): Don't warn about not being able to inline if -O0. From-SVN: r10913 --- gcc/calls.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/calls.c b/gcc/calls.c index ad05be4..b98f730 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"); -- cgit v1.1