This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: G++ templates & #pragma bug fixed, patch enclosed
- To: "Melissa O'Neill" <oneill at cs dot sfu dot ca>
- Subject: Re: G++ templates & #pragma bug fixed, patch enclosed
- From: Jason Merrill <jason at cygnus dot com>
- Date: 04 Oct 1998 20:10:31 -0700
- Cc: egcs-bugs at cygnus dot com, egcs-patches at cygnus dot com
- References: <199809022009.NAA02435@daisy.css.sfu.ca>
Thanks for the pointer. I fixed this slightly differently:
1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (pop_tinst_level): Call extract_interface_info.
(instantiate_decl): Don't save and restore file position.
Index: pt.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/pt.c,v
retrieving revision 1.206
diff -c -p -r1.206 pt.c
*** pt.c 1998/09/25 09:00:00 1.206
--- pt.c 1998/10/05 03:09:43
*************** pop_tinst_level ()
*** 3995,4000 ****
--- 3995,4001 ----
this instantiation. */
lineno = old->line;
input_filename = old->file;
+ extract_interface_info ();
current_tinst_level = old->next;
old->next = free_tinst_level;
*************** instantiate_decl (d)
*** 8004,8011 ****
tree gen_tmpl;
int nested = in_function_p ();
int pattern_defined;
- int line = lineno;
- char *file = input_filename;
/* This function should only be used to instantiate templates for
functions and static member variables. */
--- 8005,8010 ----
*************** instantiate_decl (d)
*** 8142,8150 ****
{
/* Defer all templates except inline functions used in another
function. */
- lineno = line;
- input_filename = file;
-
if (at_eof && !pattern_defined
&& DECL_EXPLICIT_INSTANTIATION (d))
/* [temp.explicit]
--- 8141,8146 ----
*************** instantiate_decl (d)
*** 8217,8225 ****
}
out:
- lineno = line;
- input_filename = file;
-
pop_from_top_level ();
pop_tinst_level ();
--- 8213,8218 ----