aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-03-25 18:44:26 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-03-25 18:44:26 -0500
commit0481a55e994e5cfded38a396186a019cdb024022 (patch)
tree8c00e2dc2fe67cde75ec490d38cfbcb231214bf1 /gcc
parent253245dfd103b08654b4c93df7e457362eb240c5 (diff)
downloadgcc-0481a55e994e5cfded38a396186a019cdb024022.zip
gcc-0481a55e994e5cfded38a396186a019cdb024022.tar.gz
gcc-0481a55e994e5cfded38a396186a019cdb024022.tar.bz2
(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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/calls.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index c7a85be..9cf1d92 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -581,9 +581,8 @@ expand_call (exp, target, ignore)
Use abstraction instead of setting TREE_ADDRESSABLE
directly. */
- 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");
+ if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline)
+ warning_with_decl (fndecl, "can't inline call to `%s'");
mark_addressable (fndecl);
}
@@ -746,7 +745,11 @@ expand_call (exp, target, ignore)
}
/* 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);
}