aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-02-27 13:13:24 -0500
committerJason Merrill <jason@gcc.gnu.org>2013-02-27 13:13:24 -0500
commit140bec21b86df21fd9a0105dc5334ac45d172505 (patch)
tree35dd8290aca2f22ffa98a2e2de1913fb9eb7a5c3 /gcc/cp/class.c
parentbbb3a9e27368ae01b96b33becb3cf662c95eba2a (diff)
downloadgcc-140bec21b86df21fd9a0105dc5334ac45d172505.zip
gcc-140bec21b86df21fd9a0105dc5334ac45d172505.tar.gz
gcc-140bec21b86df21fd9a0105dc5334ac45d172505.tar.bz2
re PR c++/56358 ([C++11] Erroneous interaction of typedef and inherited constructor declarations)
PR c++/56358 PR c++/56323 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead of the base name for inheriting ctors. (push_class_level_binding_1): Remove inheriting ctor handling. * pt.c (tsubst_decl) [USING_DECL]: Likewise. * class.c (add_implicitly_declared_members): Adjust. From-SVN: r196316
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index eaa109a..2a0351f 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -3010,11 +3010,10 @@ add_implicitly_declared_members (tree t, tree* access_decls,
{
tree using_decl = TREE_VALUE (*access_decls);
tree decl = USING_DECL_DECLS (using_decl);
- if (DECL_SELF_REFERENCE_P (decl))
+ if (DECL_NAME (using_decl) == ctor_identifier)
{
/* declare, then remove the decl */
- tree ctor_list = lookup_fnfields_slot (TREE_TYPE (decl),
- ctor_identifier);
+ tree ctor_list = decl;
location_t loc = input_location;
input_location = DECL_SOURCE_LOCATION (using_decl);
if (ctor_list)