This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
C++ PATCH: perform_implicit_conversion
- To: egcs-patches at egcs dot cygnus dot com
- Subject: C++ PATCH: perform_implicit_conversion
- From: Nathan Sidwell <nathan at acm dot org>
- Date: Fri, 17 Sep 1999 12:01:45 +0100
- Reply-To: nathan at compsci dot bristol dot ac dot uk
Hi,
I've installed the attached patch under the obvious fix rule. It stops
cascading error messages from something like,
struct A {};
void fn(const *)
{
if (A (1)) {}
}
which would give an additional "could not convert `{error}' to `bool'".
nathan
--
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
I have seen the death of PhotoShop -- it is called GIMP
nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk
1999-09-17 Nathan Sidwell <nathan@acm.org>
* call.c (perform_implicit_conversion): Deal with error_mark_node.
Index: cp/call.c
===================================================================
RCS file: /cvs/egcs/egcs/gcc/cp/call.c,v
retrieving revision 1.172
diff -c -3 -p -r1.172 call.c
*** call.c 1999/09/15 06:09:51 1.172
--- call.c 1999/09/17 10:21:24
*************** perform_implicit_conversion (type, expr)
*** 5130,5136 ****
LOOKUP_NORMAL);
if (!conv || ICS_BAD_FLAG (conv))
{
! cp_error ("could not convert `%E' to `%T'", expr, type);
return error_mark_node;
}
--- 5130,5137 ----
LOOKUP_NORMAL);
if (!conv || ICS_BAD_FLAG (conv))
{
! if (expr != error_mark_node)
! cp_error ("could not convert `%E' to `%T'", expr, type);
return error_mark_node;
}