From 67729b992aed9b55b35d140c6415513157f94580 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Fri, 16 Apr 1993 21:42:17 -0400 Subject: [PATCH] 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 --- gcc/calls.c | 3 ++- gcc/flags.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/calls.c b/gcc/calls.c index be3a498eb2f..9ad7d1665e0 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -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); } diff --git a/gcc/flags.h b/gcc/flags.h index e36a662d1b2..22bd1f04f81 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -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;