diff options
author | Jason Merrill <jason@gcc.gnu.org> | 1998-04-21 14:05:17 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-04-21 14:05:17 -0400 |
commit | 3d879eacbb35e2495eb17f97c226435ae97040c3 (patch) | |
tree | 4aefe6fd2efe071187b4233df6a00f8ca128db87 | |
parent | 4ceb7595d9833d1cd21ec87a67c2a42e03244310 (diff) | |
download | gcc-3d879eacbb35e2495eb17f97c226435ae97040c3.zip gcc-3d879eacbb35e2495eb17f97c226435ae97040c3.tar.gz gcc-3d879eacbb35e2495eb17f97c226435ae97040c3.tar.bz2 |
(convert_for_assignment): Fix handling of pmfs.
From-SVN: r19360
-rw-r--r-- | gcc/cp/typeck.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 36acd58..f891b1e 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -6844,9 +6844,11 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum) && TYPE_PTRMEMFUNC_P (type)) { tree ttl = TYPE_PTRMEMFUNC_FN_TYPE (type); - tree ttr = (TREE_CODE (rhstype) == POINTER_TYPE ? rhstype - : TYPE_PTRMEMFUNC_FN_TYPE (rhstype)); - int ctt = comp_target_types (ttl, ttr, 1); + tree ttr = (TYPE_PTRMEMFUNC_P (rhstype) + ? TYPE_PTRMEMFUNC_FN_TYPE (rhstype) + : rhstype); + int ctt = (TREE_CODE (rhstype) == INTEGER_TYPE ? 1 + : comp_target_types (ttl, ttr, 1)); if (ctt < 0) cp_pedwarn ("converting `%T' to `%T' is a contravariance violation", |