class.c (type_build_ctor_call): Return early in C++98 mode.
authorJason Merrill <jason@redhat.com>
Thu, 31 Oct 2013 14:13:42 +0000 (10:13 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 31 Oct 2013 14:13:42 +0000 (10:13 -0400)
* class.c (type_build_ctor_call): Return early in C++98 mode.
(type_build_dtor_call): Likewise.

From-SVN: r204262

gcc/cp/ChangeLog
gcc/cp/class.c

index d4c9143..a0d802f 100644 (file)
@@ -1,3 +1,8 @@
+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
index 43f90d7..64681ba 100644 (file)
@@ -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);