re PR c++/64100 (A static assert using the the current class in a noexcept test leads...
authorKai Tietz <ktietz@redhat.com>
Wed, 10 Dec 2014 11:22:34 +0000 (12:22 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Wed, 10 Dec 2014 11:22:34 +0000 (12:22 +0100)
PR c++/64100
* typeck.c (lookup_destructor): Handle incomplete type.

From-SVN: r218571

gcc/cp/ChangeLog
gcc/cp/typeck.c

index 484dd2863695b9457f21175289c9c97a2613d11d..a3d8d995853b92932f0c39877ff7fbc9d050c49c 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-10  Kai Tietz  <ktietz@redhat.com>
+
+       PR c++/64100
+       * typeck.c (lookup_destructor): Handle incomplete type.
+
 2014-12-09  Jason Merrill  <jason@redhat.com>
 
        PR c++/64129
index ae84b63c145931c3ff4fcb629e52829504a5e798..2abff6bdb76edd04ace5d11237fde078276100a3 100644 (file)
@@ -2536,6 +2536,12 @@ lookup_destructor (tree object, tree scope, tree dtor_name,
   expr = lookup_member (dtor_type, complete_dtor_identifier,
                        /*protect=*/1, /*want_type=*/false,
                        tf_warning_or_error);
+  if (!expr)
+    {
+      if (complain & tf_error)
+       cxx_incomplete_type_error (dtor_name, dtor_type);
+      return error_mark_node;
+    }
   expr = (adjust_result_of_qualified_name_lookup
          (expr, dtor_type, object_type));
   if (scope == NULL_TREE)