aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-06-17 19:00:16 -0400
committerJason Merrill <jason@gcc.gnu.org>2003-06-17 19:00:16 -0400
commit9da32fe151688a1790f3de95a6fd396d22a626dd (patch)
treeca8ddf6fa96e986b0118487b5e953bd63dcb87d8 /gcc/cp/decl.c
parentcb713a8d52e60134d85df14670a07feac505c86c (diff)
downloadgcc-9da32fe151688a1790f3de95a6fd396d22a626dd.zip
gcc-9da32fe151688a1790f3de95a6fd396d22a626dd.tar.gz
gcc-9da32fe151688a1790f3de95a6fd396d22a626dd.tar.bz2
re PR c++/10929 (-Winline warns about functions for which no definition is visible)
PR c++/10929 * tree-inline.c (expand_call_inline): Don't warn about failing to inline a function which was made inline by -finline-functions. * cp/decl.c (grokfndecl): Don't mark a function inline for -finline-functions if it isn't defined. From-SVN: r68122
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index d76133a..4ec5c31 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8883,7 +8883,7 @@ grokfndecl (tree ctype,
the user explicitly asks us to, all functions. */
if (DECL_DECLARED_INLINE_P (decl))
DECL_INLINE (decl) = 1;
- if (flag_inline_trees == 2 && !DECL_INLINE (decl))
+ if (flag_inline_trees == 2 && !DECL_INLINE (decl) && funcdef_flag)
{
DID_INLINE_FUNC (decl) = 1;
DECL_INLINE (decl) = 1;