From 2fcdec5719041a38cb6e9e4dd91115388896dd5b Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 17 Apr 1998 01:57:57 +0000 Subject: [PATCH] * decl2.c (build_expr_from_tree): Just return a PMF. From-SVN: r19256 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/decl2.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2aa936c3314..2ff3c130e40 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +Fri Apr 17 01:57:12 1998 Jason Merrill + + * decl2.c (build_expr_from_tree): Just return a PMF. + Fri Apr 17 00:45:12 1998 Mark Mitchell * typeck2.c (process_init_constructor): Don't strip cv-qualifiers diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 42cbba99ac1..5ab2f98da49 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -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);