aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2004-09-18 05:50:52 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2004-09-18 05:50:52 +0000
commita396f8ae242ddd9993230025093b5f768647d194 (patch)
tree5b612839071d1427646211852251d0557c61a619 /gcc/cp
parent9aa44508a821e8de072de1f6d8ea344753a0a4d1 (diff)
downloadgcc-a396f8ae242ddd9993230025093b5f768647d194.zip
gcc-a396f8ae242ddd9993230025093b5f768647d194.tar.gz
gcc-a396f8ae242ddd9993230025093b5f768647d194.tar.bz2
re PR pch/13361 (const wchar_t * strings not stored in pch)
* tree-inline.c (copy_tree_r): Don't duplicate constants, they're shared anyway. PR pch/13361 * c-typeck.c (constructor_asmspec): Delete. (struct initializer_stack): Delete field 'asmspec'. (start_init): Delete saving of asmspec. (finish_init): Don't update constructor_asmspec. * dwarf2out.c (rtl_for_decl_location): Duplicate string from tree. * stmt.c (expand_asm): Duplicate strings from tree. (expand_asm_operands): Likewise. * tree.c (tree_size): Update computation of size of STRING_CST. (make_node): Don't make STRING_CST nodes. (build_string): Allocate string with tree node. (tree_code_size): Clean up assertions, don't allow requests for "the size of a STRING_CST". * tree.def (STRING_CST): Update comment. * tree.h (TREE_STRING_POINTER): Adjust for change to STRING_CST. (tree_string): Place contents of string in tree node. * config/sh/sh.c (sh_handle_sp_switch_attribute): Duplicate string from tree. From-SVN: r87695
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/lex.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index be9b0d3..2cf1f74 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-16 Geoffrey Keating <geoffk@apple.com>
+
+ PR pch/13361
+ * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
+ (handle_pragma_implementation): Likewise.
+
2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 4fa1645..c7b1cf6 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -471,7 +471,7 @@ handle_pragma_interface (cpp_reader* dfile ATTRIBUTE_UNUSED )
else if (fname == 0)
main_filename = lbasename (input_filename);
else
- main_filename = TREE_STRING_POINTER (fname);
+ main_filename = ggc_strdup (TREE_STRING_POINTER (fname));
finfo = get_fileinfo (input_filename);
@@ -519,7 +519,7 @@ handle_pragma_implementation (cpp_reader* dfile ATTRIBUTE_UNUSED )
}
else
{
- main_filename = TREE_STRING_POINTER (fname);
+ main_filename = ggc_strdup (TREE_STRING_POINTER (fname));
if (cpp_included (parse_in, main_filename))
warning ("#pragma implementation for %s appears after file is included",
main_filename);