This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(C++) patch to cp_convert_to_pointer
- To: egcs-patches at cygnus dot com
- Subject: (C++) patch to cp_convert_to_pointer
- From: Jason Merrill <jason at cygnus dot com>
- Date: Sun, 24 Jan 1999 15:56:31 -0800
Fixing an oversight in Mark's 12/14 patch.
1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
* cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
Index: cvt.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/cvt.c,v
retrieving revision 1.51
diff -c -p -r1.51 cvt.c
*** cvt.c 1999/01/18 12:49:17 1.51
--- cvt.c 1999/01/24 23:51:58
*************** cp_convert_to_pointer (type, expr)
*** 226,232 ****
if (integer_zerop (expr))
{
if (TYPE_PTRMEMFUNC_P (type))
! return build_ptrmemfunc (type, expr, 0);
expr = build_int_2 (0, 0);
TREE_TYPE (expr) = type;
return expr;
--- 226,232 ----
if (integer_zerop (expr))
{
if (TYPE_PTRMEMFUNC_P (type))
! return build_ptrmemfunc (TYPE_PTRMEMFUNC_FN_TYPE (type), expr, 0);
expr = build_int_2 (0, 0);
TREE_TYPE (expr) = type;
return expr;