This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
C++ PATCH to friendly_abort
- To: gcc-patches at gcc dot gnu dot org
- Subject: C++ PATCH to friendly_abort
- From: Jason Merrill <jason at redhat dot com>
- Date: 08 Feb 2001 15:03:02 +0000
This patch brings C++ aborts in line with the backend, which replaces the
usual abort message with "confused by earlier errors".
2001-02-08 Jason Merrill <jason@redhat.com>
* typeck2.c (friendly_abort): Don't say anything if we have
earlier errors or sorries.
*** typeck2.c.~1~ Thu Feb 8 12:43:04 2001
--- typeck2.c Thu Feb 8 14:59:32 2001
*************** friendly_abort (where, file, line, func)
*** 261,271 ****
int line;
const char *func;
{
! if (where > 0)
! error ("Internal error #%d.", where);
! /* Uncount this error, so finish_abort will do the right thing. */
! --errorcount;
fancy_abort (file, line, func);
}
--- 261,275 ----
int line;
const char *func;
{
! if (errorcount > 0 || sorrycount > 0)
! /* Say nothing. */;
! else if (where > 0)
! {
! error ("Internal error #%d.", where);
! /* Uncount this error, so internal_error will do the right thing. */
! --errorcount;
! }
fancy_abort (file, line, func);
}