diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-13 16:36:26 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-13 16:36:26 +0000 |
commit | 7b47f64f9aadff2f2aa04596e9caf499c90ce49d (patch) | |
tree | 918dfcbcce0be450af8791c23f979284209cbe84 /gcc/cp/decl.c | |
parent | 39b63716d1a6e1074af2f64d771d0d8219521f1b (diff) | |
download | gcc-7b47f64f9aadff2f2aa04596e9caf499c90ce49d.tar.gz |
* decl.c (pushdecl_class_level): Honor requests to bind names to
OVERLOADs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56258 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 874baf955d4..bb0abbdf83f 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4259,13 +4259,13 @@ void pushdecl_class_level (x) tree x; { - /* Don't use DECL_ASSEMBLER_NAME here! Everything that looks in class - scope looks for the pre-mangled name. */ - register tree name; + tree name; + /* Get the name of X. */ if (TREE_CODE (x) == OVERLOAD) - x = OVL_CURRENT (x); - name = DECL_NAME (x); + name = DECL_NAME (get_first_fn (x)); + else + name = DECL_NAME (x); if (name) { @@ -4275,11 +4275,12 @@ pushdecl_class_level (x) } else if (ANON_AGGR_TYPE_P (TREE_TYPE (x))) { + /* If X is an anonymous aggregate, all of its members are + treated as if they were members of the class containing the + aggregate, for naming purposes. */ tree f; - for (f = TYPE_FIELDS (TREE_TYPE (x)); - f; - f = TREE_CHAIN (f)) + for (f = TYPE_FIELDS (TREE_TYPE (x)); f; f = TREE_CHAIN (f)) pushdecl_class_level (f); } } |