diff options
author | Jason Merrill <jason@redhat.com> | 2008-12-03 14:22:08 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2008-12-03 14:22:08 -0500 |
commit | 27fb09b78e186d3d0173ee42cfc0af6801c2a9e2 (patch) | |
tree | 8cd5b380bdc43051a74bfd205672a42e6737f609 /gcc/cp/decl.c | |
parent | 6efe1abf4c1fa501ed14b8d70a9c3f63df46102c (diff) | |
download | gcc-27fb09b78e186d3d0173ee42cfc0af6801c2a9e2.zip gcc-27fb09b78e186d3d0173ee42cfc0af6801c2a9e2.tar.gz gcc-27fb09b78e186d3d0173ee42cfc0af6801c2a9e2.tar.bz2 |
re PR c++/38380 (explicitly defaulted constructors vs. empty direct initialization)
PR c++/38380
* decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
on explicit constructors.
* pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
CONSTRUCTOR_IS_DIRECT_INIT.
From-SVN: r142404
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index d045935..8714432 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -9099,15 +9099,6 @@ grokdeclarator (const cp_declarator *declarator, is called a converting constructor. */ if (explicitp == 2) DECL_NONCONVERTING_P (decl) = 1; - else if (DECL_CONSTRUCTOR_P (decl)) - { - /* A constructor with no parms is not a conversion. - Ignore any compiler-added parms. */ - tree arg_types = FUNCTION_FIRST_USER_PARMTYPE (decl); - - if (arg_types == void_list_node) - DECL_NONCONVERTING_P (decl) = 1; - } } else if (TREE_CODE (type) == METHOD_TYPE) { |