Commit 1ca66f7e by Paolo Carlini Committed by Paolo Carlini

re PR c++/58255 ([C++11] explicit delegating constructor with no arguments wrongly rejected)

/cp
2013-08-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58255
	* init.c (build_aggr_init): When init == void_type_node do not
	set LOOKUP_ONLYCONVERTING.

/testsuite
2013-08-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58255
	* g++.dg/cpp0x/dc7.C: New.

From-SVN: r202061
parent b208ba40
2013-08-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58255
* init.c (build_aggr_init): When init == void_type_node do not
set LOOKUP_ONLYCONVERTING.
2013-08-27 Caroline Tice <cmtice@google.com>
* vtable-class-hierarchy.c: Remove unnecessary include statements.
......
......@@ -1464,7 +1464,8 @@ build_aggr_init (tree exp, tree init, int flags, tsubst_flags_t complain)
TREE_READONLY (exp) = 0;
TREE_THIS_VOLATILE (exp) = 0;
if (init && TREE_CODE (init) != TREE_LIST
if (init && init != void_type_node
&& TREE_CODE (init) != TREE_LIST
&& !(TREE_CODE (init) == TARGET_EXPR
&& TARGET_EXPR_DIRECT_INIT_P (init))
&& !(BRACE_ENCLOSED_INITIALIZER_P (init)
......
2013-08-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58255
* g++.dg/cpp0x/dc7.C: New.
2013-08-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/58257
......
// PR c++/58255
// { dg-do compile { target c++11 } }
struct A {
explicit A() { }
A(int x) : A() { }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment