This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA] PR debug/10055: fix input_filename clobber
- From: Michael Elizabeth Chastain <mec at shout dot net>
- To: mark at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org, neil at daikokuya dot co dot uk
- Date: Sun, 6 Jul 2003 23:09:02 -0400
- Subject: Re: [RFA] PR debug/10055: fix input_filename clobber
mark> This patch is OK -- but remove the first person comment.
mark> Just write ...
Okey-doke. Here is a revised patch with Mark's wording for the comment.
Thanks for the quick response!
Michael C
2003-07-06 Michael Chastain <mec@shout.net>
PR debug/10055
* lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
assigning to input_filename directly.
Index: cp/lex.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/lex.c,v
retrieving revision 1.308
diff -c -3 -p -r1.308 lex.c
*** cp/lex.c 30 Jun 2003 19:36:22 -0000 1.308
--- cp/lex.c 7 Jul 2003 02:56:43 -0000
*************** cxx_init (void)
*** 392,398 ****
INIT_STATEMENT_CODES (stmt_codes);
! input_filename = "<internal>";
init_reswords ();
init_tree ();
--- 392,402 ----
INIT_STATEMENT_CODES (stmt_codes);
! /* We cannot just assign to input_filename because it has already been
! initialized and will be used later as an N_BINCL for stabs+
! debugging. */
!
! push_srcloc ("<internal>", 0);
init_reswords ();
init_tree ();
*************** cxx_init (void)
*** 429,440 ****
interface_unknown = 1;
if (c_common_init () == false)
! return false;
init_cp_pragma ();
init_repo (main_input_filename);
return true;
}
--- 433,448 ----
interface_unknown = 1;
if (c_common_init () == false)
! {
! pop_srcloc();
! return false;
! }
init_cp_pragma ();
init_repo (main_input_filename);
+ pop_srcloc();
return true;
}