From 83f31d8d5d6e738a2a1b844acd992e18cdd328d1 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 31 Oct 2013 10:13:42 -0400 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/class.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d4c9143c4b6..a0d802f1c37 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2013-10-31 Jason Merrill + + * class.c (type_build_ctor_call): Return early in C++98 mode. + (type_build_dtor_call): Likewise. + 2013-10-31 Paolo Carlini PR c++/58932 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 43f90d72118..64681ba44df 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -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); -- 2.30.2