From: Michael Chastain Date: Mon, 7 Jul 2003 05:02:22 +0000 (+0000) Subject: re PR debug/10055 (g++ emits "" as source filename with -gstabs+) X-Git-Tag: releases/gcc-3.4.0~5085 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=267a07523462164e39e88f6bec8709220ee62836;p=thirdparty%2Fgcc.git re PR debug/10055 (g++ emits "" as source filename with -gstabs+) PR debug/10055 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than assigning to input_filename directly. From-SVN: r69032 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dd271350d861..3539a0699520 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2003-07-06 Michael Chastain + + PR debug/10055 + * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than + assigning to input_filename directly. + 2003-07-06 Kazu Hirata * call.c: Fix comment formatting. diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index a3f287878d26..7d63e2c99da5 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -392,7 +392,10 @@ cxx_init (void) INIT_STATEMENT_CODES (stmt_codes); - input_filename = ""; + /* 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 ("", 0); init_reswords (); init_tree (); @@ -429,12 +432,16 @@ cxx_init (void) interface_unknown = 1; if (c_common_init () == false) - return false; + { + pop_srcloc(); + return false; + } init_cp_pragma (); init_repo (main_input_filename); + pop_srcloc(); return true; }