* decl2.c (build_expr_from_tree): Just return a PMF.
authorJason Merrill <jason@yorick.cygnus.com>
Fri, 17 Apr 1998 01:57:57 +0000 (01:57 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 17 Apr 1998 01:57:57 +0000 (21:57 -0400)
From-SVN: r19256

gcc/cp/ChangeLog
gcc/cp/decl2.c

index 2aa936c..2ff3c13 100644 (file)
@@ -1,3 +1,7 @@
+Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * decl2.c (build_expr_from_tree): Just return a PMF.
+
 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
 
        * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
index 42cbba9..5ab2f98 100644 (file)
@@ -3540,8 +3540,14 @@ build_expr_from_tree (t)
 
     case CONSTRUCTOR:
       {
-       tree r = build_nt (CONSTRUCTOR, NULL_TREE,
-                          build_expr_from_tree (CONSTRUCTOR_ELTS (t)));
+       tree r;
+
+       /* digest_init will do the wrong thing if we let it.  */
+       if (TREE_TYPE (t) && TYPE_PTRMEMFUNC_P (TREE_TYPE (t)))
+         return t;
+
+       r = build_nt (CONSTRUCTOR, NULL_TREE,
+                     build_expr_from_tree (CONSTRUCTOR_ELTS (t)));
 
        if (TREE_TYPE (t))
          return digest_init (TREE_TYPE (t), r, 0);