diff options
author | pfg <pfg@FreeBSD.org> | 2013-12-01 22:08:19 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2013-12-01 22:08:19 +0000 |
commit | 49bd75ce1c93f586d0abc4875680e59dc61f7833 (patch) | |
tree | e7be10997cb7afcae8fee35688ac41e6ae99a92d /contrib/gcc | |
parent | 9051411db5a7678b9610125e7c525d98df1adf22 (diff) | |
download | FreeBSD-src-49bd75ce1c93f586d0abc4875680e59dc61f7833.zip FreeBSD-src-49bd75ce1c93f586d0abc4875680e59dc61f7833.tar.gz |
libiberty: upstream updates.
There is a new ChangeLog.gcc43 file but most notable:
* floatformat.c (get_field): Fix segfault with little-endian word
order on 64-bit hosts.
(put_field): Likewise.
(min): Move definition.
gcc/cp/ChangeLog
2007-05-04 Geoffrey Keating <geoffk@apple.com>
PR 31775
* mangle.c (write_mangled_name): Mangle static variable names.
(write_unqualified_name): Use local-source-name for
namespace-scope static variables.
(Completes FreeBSD's r258017 )
Obtained from: gcc 4.3 (rev. 118552, 120097, 20698, 120702,
121364, 122972, 126588; GPLv2)
MFC after: 2 weeks
Diffstat (limited to 'contrib/gcc')
-rw-r--r-- | contrib/gcc/cp/ChangeLog.gcc43 | 9 | ||||
-rw-r--r-- | contrib/gcc/cp/mangle.c | 18 |
2 files changed, 24 insertions, 3 deletions
diff --git a/contrib/gcc/cp/ChangeLog.gcc43 b/contrib/gcc/cp/ChangeLog.gcc43 index b95ac58..701bea8 100644 --- a/contrib/gcc/cp/ChangeLog.gcc43 +++ b/contrib/gcc/cp/ChangeLog.gcc43 @@ -1,4 +1,4 @@ -2007-07-09 Geoffrey Keating <geoffk@apple.com> +2007-07-09 Geoffrey Keating <geoffk@apple.com> (r126529) PR 32617 * decl.c (cxx_init_decl_processing): Don't set @@ -18,6 +18,13 @@ * decl2.c (determine_visibility): Remove duplicate code for handling type info. +2007-05-05 Geoffrey Keating <geoffk@apple.com> (r124467) + + PR 31775 + * mangle.c (write_mangled_name): Mangle static variable names. + (write_unqualified_name): Use local-source-name for + namespace-scope static variables. + 2007-03-12 Seongbae Park <seongbae.park@gmail.com> (r122851) * decl.c (compute_array_index_type): New warning flag warn_vla. diff --git a/contrib/gcc/cp/mangle.c b/contrib/gcc/cp/mangle.c index 74ff854..c327133 100644 --- a/contrib/gcc/cp/mangle.c +++ b/contrib/gcc/cp/mangle.c @@ -688,7 +688,8 @@ write_mangled_name (const tree decl, bool top_level) } } else if (TREE_CODE (decl) == VAR_DECL - /* The names of global variables aren't mangled. */ + /* The names of non-static global variables aren't mangled. */ + && DECL_EXTERNAL_LINKAGE_P (decl) && (CP_DECL_CONTEXT (decl) == global_namespace /* And neither are `extern "C"' variables. */ || DECL_EXTERN_C_P (decl))) @@ -1086,7 +1087,10 @@ write_template_prefix (const tree node) <unqualified-name> ::= <operator-name> ::= <special-name> - ::= <source-name> */ + ::= <source-name> + ::= <local-source-name> + + <local-source-name> ::= L <source-name> <discriminator> */ static void write_unqualified_name (const tree decl) @@ -1126,6 +1130,16 @@ write_unqualified_name (const tree decl) write_string (oni[DECL_OVERLOADED_OPERATOR_P (decl)].mangled_name); } + else if (VAR_OR_FUNCTION_DECL_P (decl) && ! TREE_PUBLIC (decl) + && DECL_NAMESPACE_SCOPE_P (decl) + && decl_linkage (decl) == lk_internal) + { + MANGLE_TRACE_TREE ("local-source-name", decl); + write_char ('L'); + write_source_name (DECL_NAME (decl)); + /* The default discriminator is 1, and that's all we ever use, + so there's no code to output one here. */ + } else write_source_name (DECL_NAME (decl)); } |