aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl.cc')
-rw-r--r--gcc/cp/decl.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
index 0579107..2089e4c 100644
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -5806,6 +5806,23 @@ cp_make_fname_decl (location_t loc, tree id, int type_dep)
name = cxx_printable_name (current_function_decl, 2);
}
+ if (!release_name)
+ {
+ cpp_string cstr = { 0, 0 }, strname;
+ size_t len = strlen (name) + 3; /* Two for '"'s. One for NULL. */
+ char *namep = XNEWVEC (char, len);
+ snprintf (namep, len, "\"%s\"", name);
+ strname.text = (unsigned char *) namep;
+ strname.len = len - 1;
+ if (cpp_interpret_string (parse_in, &strname, 1, &cstr, CPP_STRING))
+ {
+ name = (const char *) cstr.text;
+ release_name = true;
+ }
+
+ XDELETEVEC (namep);
+ }
+
size_t length = strlen (name);
domain = build_index_type (size_int (length));
init = build_string (length + 1, name);