Commit 83f31d8d by Jason Merrill Committed by Jason Merrill

class.c (type_build_ctor_call): Return early in C++98 mode.

	* class.c (type_build_ctor_call): Return early in C++98 mode.
	(type_build_dtor_call): Likewise.

From-SVN: r204262
parent 5d46aaee
2013-10-31 Jason Merrill <jason@redhat.com>
* class.c (type_build_ctor_call): Return early in C++98 mode.
(type_build_dtor_call): Likewise.
2013-10-31 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58932
......
......@@ -5163,6 +5163,8 @@ type_build_ctor_call (tree t)
return false;
if (!TYPE_HAS_DEFAULT_CONSTRUCTOR (inner))
return true;
if (cxx_dialect < cxx11)
return false;
/* A user-declared constructor might be private, and a constructor might
be trivial but deleted. */
for (tree fns = lookup_fnfields_slot (inner, complete_ctor_identifier);
......@@ -5188,6 +5190,8 @@ type_build_dtor_call (tree t)
if (!CLASS_TYPE_P (inner) || ANON_AGGR_TYPE_P (inner)
|| !COMPLETE_TYPE_P (inner))
return false;
if (cxx_dialect < cxx11)
return false;
/* A user-declared destructor might be private, and a destructor might
be trivial but deleted. */
for (tree fns = lookup_fnfields_slot (inner, complete_dtor_identifier);
......
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