diff options
author | Jason Merrill <jason@redhat.com> | 2001-07-25 11:04:32 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2001-07-25 11:04:32 -0400 |
commit | 08ac397c043f41656afacca215910e4847d90429 (patch) | |
tree | 1ff1db2f3cbcf8e88fb53dffde7dfb01277d772d /gcc/cp/mangle.c | |
parent | ea0eceb16511d7e3e6ab0fb78e6641b8aed4e829 (diff) | |
download | gcc-08ac397c043f41656afacca215910e4847d90429.zip gcc-08ac397c043f41656afacca215910e4847d90429.tar.gz gcc-08ac397c043f41656afacca215910e4847d90429.tar.bz2 |
call.c (joust): Only prefer a non-builtin candidate to a builtin one if...
* call.c (joust): Only prefer a non-builtin candidate to a builtin
one if they have the same signature.
* cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
it rather than toplevel_bindings_p. Give it a mangled name if static.
(convert_to_reference): Adjust.
* decl2.c (get_temp_name): Lose.
* mangle.c (mangle_ref_init_variable): New fn.
(mangle_guard_variable): Strip the ref-init header.
* cp-tree.h: Adjust.
* decl.c (cp_finish_decl): Add the DECL_STMT after processing the
initializer.
(grok_reference_init): Always use DECL_INITIAL.
From-SVN: r44358
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r-- | gcc/cp/mangle.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 2b1b009..6e94681 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -2420,10 +2420,28 @@ mangle_guard_variable (variable) { start_mangling (); write_string ("_ZGV"); - write_name (variable, /*ignore_local_scope=*/0); + if (strncmp (IDENTIFIER_POINTER (DECL_NAME (variable)), "_ZGR", 4) == 0) + /* The name of a guard variable for a reference temporary should refer + to the reference, not the temporary. */ + write_string (IDENTIFIER_POINTER (DECL_NAME (variable)) + 4); + else + write_name (variable, /*ignore_local_scope=*/0); return get_identifier (finish_mangling ()); } +/* Return an identifier for the name of a temporary variable used to + initialize a static reference. This isn't part of the ABI, but we might + as well call them something readable. */ + +tree +mangle_ref_init_variable (variable) + tree variable; +{ + start_mangling (); + write_string ("_ZGR"); + write_name (variable, /*ignore_local_scope=*/0); + return get_identifier (finish_mangling ()); +} /* Foreign language type mangling section. */ |