From d08940b2c252d872b47eeb4ba6939ffd987da65e Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 20 May 1999 20:19:42 +0000 Subject: [PATCH] class.c (instantiate_type): Downgrade errors for object-dependent memfn refs to pedwarn. * class.c (instantiate_type): Downgrade errors for object-dependent memfn refs to pedwarn. From-SVN: r27072 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/class.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 70e3a246fe9..f700c81b2ce 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1999-05-20 Jason Merrill + + * class.c (instantiate_type): Downgrade errors for object-dependent + memfn refs to pedwarn. + 1999-05-20 Mark Mitchell * decl.c (grokdeclarator): Don't treat [] as indicating a diff --git a/gcc/cp/class.c b/gcc/cp/class.c index fe56078644c..e3d5bb95490 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5015,15 +5015,15 @@ instantiate_type (lhstype, rhs, flags) field = OVL_FUNCTION (field); if (TREE_CODE (field) == FUNCTION_DECL) { - cp_error ("object-dependent reference `%E' can only be used in a call", + cp_pedwarn ("object-dependent reference `%E' can only be used in a call", DECL_NAME (field)); - cp_error (" to form a pointer to member function, say `&%T::%E'", + cp_pedwarn (" to form a pointer to member function, say `&%T::%E'", t, DECL_NAME (field)); } else - cp_error ("object-dependent reference can only be used in a call"); + cp_pedwarn ("object-dependent reference can only be used in a call"); } - return error_mark_node; + return r; } return r;