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]

PATCH for error messages in template instantiation



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


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