PATCH for error messages in template instantiation
Mark Mitchell
mark@markmitchell.com
Wed May 27 16:43:00 GMT 1998
Michele --
Here's a patch for your bug. Jason, OK?
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com
1998-05-27 Mark Mitchell <mark@markmitchell.com>
* pt.c (instantiate_decl): Reset lineno and filename after calling
regenerate_decl_from_template.
Index: pt.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/pt.c,v
retrieving revision 1.146
diff -c -p -r1.146 pt.c
*** pt.c 1998/05/27 07:07:24 1.146
--- pt.c 1998/05/27 23:43:18
*************** instantiate_decl (d)
*** 7158,7167 ****
goto out;
}
lineno = DECL_SOURCE_LINE (d);
input_filename = DECL_SOURCE_FILE (d);
-
- regenerate_decl_from_template (d, td);
if (TREE_CODE (d) == VAR_DECL)
{
--- 7158,7169 ----
goto out;
}
+ regenerate_decl_from_template (d, td);
+
+ /* We already set the file and line above. Reset them now in case
+ they changed as a result of calling regenerate_decl_from_template. */
lineno = DECL_SOURCE_LINE (d);
input_filename = DECL_SOURCE_FILE (d);
if (TREE_CODE (d) == VAR_DECL)
{
More information about the Gcc-patches
mailing list