This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

(C++) template inlining patch


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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]