This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH for error messages in template instantiation
- To: egcs-patches at cygnus dot com
- Subject: PATCH for error messages in template instantiation
- From: Mark Mitchell <mark at markmitchell dot com>
- Date: Wed, 27 May 1998 16:45:45 -0700
- Cc: Michele Bini <mbini at dada dot it>
- Reply-to: mark at markmitchell dot com
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)
{