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]

PATCH to internal_error


The >1 is left over from my earlier finish_abort function, which expected
error to have been called immediately before the test; now that we don't do
that, we need to adjust the test.

And the message should still have source location information.

2001-02-08  Jason Merrill  <jason@redhat.com>

	* diagnostic.c (internal_error): Say "confused" after 1 error, not
	two.  Print file and line with "confused" message.

*** diagnostic.c.~1~	Tue Feb  6 16:28:19 2001
--- diagnostic.c	Thu Feb  8 12:45:02 2001
*************** internal_error VPARAMS ((const char *msg
*** 1456,1464 ****
    msgid = va_arg (ap, const char *);
  #endif
  
!   if (errorcount > 1 || sorrycount > 0)
      {
!       fprintf (stderr, "confused by earlier errors, bailing out\n");
        exit (FATAL_EXIT_CODE);
      }
  
--- 1456,1465 ----
    msgid = va_arg (ap, const char *);
  #endif
  
!   if (errorcount > 0 || sorrycount > 0)
      {
!       fprintf (stderr, "%s:%d: confused by earlier errors, bailing out\n",
! 	       input_filename, lineno);
        exit (FATAL_EXIT_CODE);
      }
  

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