This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Fix 4803
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 30 Dec 2002 16:21:22 +0000
- Subject: Re: [C++ PATCH] Fix 4803
- References: <200212301420.JAA08594@makai.watson.ibm.com>
David Edelsohn wrote:
powerpc-ibm-aix4.3.3.0
mm, even after building that I see no error. I suspect the attached patch
will fix the problem though, could you give it a whirl? thanks
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
* decl2.c (finish_file): Make undefined inlines extern.
Index: cp/decl2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v
retrieving revision 1.584
diff -c -3 -p -r1.584 decl2.c
*** cp/decl2.c 29 Dec 2002 14:53:05 -0000 1.584
--- cp/decl2.c 30 Dec 2002 16:13:50 -0000
*************** finish_file ()
*** 2802,2808 ****
if (TREE_USED (decl) && DECL_DECLARED_INLINE_P (decl)
&& !(TREE_ASM_WRITTEN (decl) || DECL_SAVED_TREE (decl)))
! cp_warning_at ("inline function `%D' used but never defined", decl);
}
/* We give C linkage to static constructors and destructors. */
--- 2802,2815 ----
if (TREE_USED (decl) && DECL_DECLARED_INLINE_P (decl)
&& !(TREE_ASM_WRITTEN (decl) || DECL_SAVED_TREE (decl)))
! {
! cp_warning_at ("inline function `%D' used but never defined", decl);
! /* This symbol is effectively an "extern" declaration now.
! This is not strictly necessary, but removes a duplicate
! warning. */
! TREE_PUBLIC (decl) = 1;
! }
!
}
/* We give C linkage to static constructors and destructors. */