]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/5104 (template using std::set_terminate fails due to throw() qualifier...
authorJason Merrill <jason@redhat.com>
Wed, 3 Apr 2002 23:47:20 +0000 (18:47 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 3 Apr 2002 23:47:20 +0000 (18:47 -0500)
        PR c++/5104
        * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
        specifiers.
        [METHOD_TYPE]: Use same code as FUNCTION_TYPE.

From-SVN: r51823

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

index d65701f4554cb910c937794b49b23a41c734ea27..fe79ba7d6ddaa7102d43a294c9d0a32258107064 100644 (file)
@@ -1,3 +1,10 @@
+2002-04-03  Jason Merrill  <jason@redhat.com>
+
+       PR c++/5104
+       * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
+       specifiers.
+       [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
+
 2002-03-25  Jeff Knaggs  <jknaggs@redhat.com>
 
        * typeck.c (expand_ptrmemfunc_cst): Scale idx down to an index
index 90afd94ac8a757299dfaf99a23b9b3de8f0acacf..6019e7c0e01fafee4ee0fe11d973ef390e3c616c 100644 (file)
@@ -1046,20 +1046,6 @@ comptypes (t1, t2, strict)
             && comptypes (TREE_TYPE (t1), TREE_TYPE (t2), strict));
       break;
 
-    case METHOD_TYPE:
-      if (! comp_except_specs (TYPE_RAISES_EXCEPTIONS (t1),
-                              TYPE_RAISES_EXCEPTIONS (t2), 1))
-       return 0;
-
-      /* This case is anti-symmetrical!
-        One can pass a base member (or member function)
-        to something expecting a derived member (or member function),
-        but not vice-versa!  */
-
-      val = (comptypes (TREE_TYPE (t1), TREE_TYPE (t2), strict)
-            && compparms (TYPE_ARG_TYPES (t1), TYPE_ARG_TYPES (t2)));
-      break;
-
     case POINTER_TYPE:
     case REFERENCE_TYPE:
       t1 = TREE_TYPE (t1);
@@ -1074,11 +1060,8 @@ comptypes (t1, t2, strict)
        goto look_hard;
       break;
 
+    case METHOD_TYPE:
     case FUNCTION_TYPE:
-      if (! comp_except_specs (TYPE_RAISES_EXCEPTIONS (t1),
-                              TYPE_RAISES_EXCEPTIONS (t2), 1))
-       return 0;
-
       val = ((TREE_TYPE (t1) == TREE_TYPE (t2)
              || comptypes (TREE_TYPE (t1), TREE_TYPE (t2), strict))
             && compparms (TYPE_ARG_TYPES (t1), TYPE_ARG_TYPES (t2)));