This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(C++) template inlining patch
- To: gcc-patches at gcc dot gnu dot org
- Subject: (C++) template inlining patch
- From: Jason Merrill <jason at cygnus dot com>
- Date: Thu, 2 Mar 2000 16:00:25 -0800
inlinable_function_p thinks that we can't inline a function that has
TI_PENDING_TEMPLATE_FLAG set, which would make sense if we remembered to
clear it when appropriate...
Fixes -Winline warning on valarray.cc.
2000-03-01 Jason Merrill <jason@casey.cygnus.com>
* pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
Index: pt.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/pt.c,v
retrieving revision 1.400
diff -c -p -r1.400 pt.c
*** pt.c 2000/02/29 10:29:51 1.400
--- pt.c 2000/03/02 23:58:02
*************** instantiate_decl (d)
*** 9568,9573 ****
--- 9568,9576 ----
try to instantiate it again. */
DECL_TEMPLATE_INSTANTIATED (d) = 1;
+ /* And we're not deferring instantiation any more. */
+ TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (d)) = 0;
+
/* Regenerate the declaration in case the template has been modified
by a subsequent redeclaration. */
regenerate_decl_from_template (d, td);