aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@lsd.ic.unicamp.br>1999-09-15 06:11:48 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-15 06:11:48 +0000
commit354f0b0403d1b6e19a9f23698589c148368607c8 (patch)
tree32baf01514cda479715e53feaee7e12eee1d1bea /gcc
parent9263e6d6cd693077540af9c91a0d11df55aac444 (diff)
downloadgcc-354f0b0403d1b6e19a9f23698589c148368607c8.zip
gcc-354f0b0403d1b6e19a9f23698589c148368607c8.tar.gz
gcc-354f0b0403d1b6e19a9f23698589c148368607c8.tar.bz2
lex.c (cp_pragma_interface, [...]): Copy filenames with ggc_alloc_string.
* lex.c (cp_pragma_interface, cp_pragma_implementation): Copy filenames with ggc_alloc_string. From-SVN: r29427
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/lex.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9697001..40d0fbf 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
+ filenames with ggc_alloc_string.
+
1999-09-14 Mark Mitchell <mark@codesourcery.com>
* decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 49dd728..ae0d7e4 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -1219,7 +1219,7 @@ cp_pragma_interface (main_filename)
/* Get default. */
impl_file_chain
= (struct impl_files *) xmalloc (sizeof (struct impl_files));
- impl_file_chain->filename = filename;
+ impl_file_chain->filename = ggc_alloc_string (filename, -1);
impl_file_chain->next = 0;
#endif
}
@@ -1254,7 +1254,7 @@ cp_pragma_implementation (main_filename)
if (ifiles == 0)
{
ifiles = (struct impl_files*) xmalloc (sizeof (struct impl_files));
- ifiles->filename = main_filename;
+ ifiles->filename = ggc_alloc_string (main_filename, -1);
ifiles->next = impl_file_chain;
impl_file_chain = ifiles;
}
@@ -1264,7 +1264,7 @@ cp_pragma_implementation (main_filename)
|| ! strcmp (main_filename, input_filename))
{
impl_file_chain = (struct impl_files*) xmalloc (sizeof (struct impl_files));
- impl_file_chain->filename = main_filename;
+ impl_file_chain->filename = ggc_alloc_string (main_filename, -1);
impl_file_chain->next = 0;
}
else