aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Chastain <mec@shout.net>2003-07-07 05:02:22 +0000
committerNeil Booth <neil@gcc.gnu.org>2003-07-07 05:02:22 +0000
commit267a07523462164e39e88f6bec8709220ee62836 (patch)
tree572d4d587f1d643970d79c84e54431e0f1e04bd0
parent9bb34f3c3e49abe308451859e30db96b290280eb (diff)
downloadgcc-267a07523462164e39e88f6bec8709220ee62836.zip
gcc-267a07523462164e39e88f6bec8709220ee62836.tar.gz
gcc-267a07523462164e39e88f6bec8709220ee62836.tar.bz2
re PR debug/10055 (g++ emits "<internal>" 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
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/lex.c11
2 files changed, 15 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index dd27135..3539a06 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
* call.c: Fix comment formatting.
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index a3f2878..7d63e2c 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 = "<internal>";
+ /* 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 ();
@@ -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;
}