This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

C++ PATCH to friendly_abort


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);
  }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]