cpperror.c, [...]: Never call abort.

1999-04-14 12:37 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
	* cpperror.c, cppexp.c, cpplib.c: Never call abort.
	* cpphash.c: Only call abort when we detect corruption of the
	malloc arena.
	* cppmain.c: Don't define fatal or fancy_abort.

From-SVN: r26442
This commit is contained in:
Zack Weinberg 1999-04-14 09:40:56 +00:00
parent 42ebbb0a1d
commit 34ca9541e7
6 changed files with 25 additions and 28 deletions

View File

@ -1,3 +1,10 @@
1999-04-14 12:37 -0400 Zack Weinberg <zack@rabi.columbia.edu>
* cpperror.c, cppexp.c, cpplib.c: Never call abort.
* cpphash.c: Only call abort when we detect corruption of the
malloc arena.
* cppmain.c: Don't define fatal or fancy_abort.
Wed Apr 14 09:19:39 1999 Jan Hubicka <hubicka@freesoft.cz>
* i386.c (x86_adjust_cost): Agi stall takes 1 cycle on Pentium, fst
@ -36,7 +43,7 @@ Wed Apr 14 00:08:46 1999 Richard Henderson <rth@cygnus.com>
* i386.h (memory_address_length): Declare it.
Tue Apr 13 22:52:04 1999 Donn Terry (donn@interix.com)
Martin Heller (Ing.-Buero_Heller@t-online.de)
Martin Heller (Ing.-Buero_Heller@t-online.de)
* configure.in (interix Alpha): Add.
(winnt Alpha): Use alpha32.h
@ -55,7 +62,7 @@ Tue Apr 13 22:52:04 1999 Donn Terry (donn@interix.com)
* config/alpha/xm-alpha-interix.h: New file.
* config/alpha/t-interix: New file.
* config/alpha/t-interix: New file.
* fixinc/mkfixinc.sh (interix/Alpha): Add.

View File

@ -114,7 +114,7 @@ v_cpp_message (pfile, is_error, msgid, ap)
pfile->errors = CPP_FATAL_LIMIT;
break;
default:
abort ();
cpp_fatal (pfile, "internal error: bad is_error(%d) in v_cpp_message", is_error);
}
vfprintf (stderr, _(msgid), ap);

View File

@ -721,7 +721,8 @@ cpp_parse_expr (pfile)
switch (op.op)
{
case NAME:
abort ();
cpp_fatal (pfile, "internal error: cpp_lex returns a NAME");
goto syntax_error;
case INT: case CHAR:
top->value = op.value;
top->unsignedp = op.unsignedp;

View File

@ -26,6 +26,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
#undef abort
static int comp_def_part PARAMS ((int, U_CHAR *, int, U_CHAR *,
int, int));
@ -290,7 +291,10 @@ collect_expansion (pfile, buf, limit, nargs, arglist)
that something smarter should happen. */
if (limit < buf)
abort ();
{
cpp_fatal (pfile, "internal error: limit < buf in collect_expansion");
limit = buf; /* treat it like a null defn */
}
/* Find the beginning of the trailing whitespace. */
p = buf;
@ -1011,9 +1015,6 @@ special_symbol (hp, pfile)
cpp_fatal (pfile, "cpplib internal error: invalid special hash type");
return;
}
/* This point should be unreachable. */
abort ();
}
/* Expand a macro call.
@ -1408,7 +1409,10 @@ macroexpand (pfile, hp)
}
if (totlen > xbuf_len)
abort ();
{
cpp_fatal (pfile, "internal_error: buffer overrun in macroexpand");
return;
}
}
/* if there is anything left of the definition

View File

@ -836,7 +836,10 @@ cpp_expand_to_buffer (pfile, buf, length)
#endif
if (length < 0)
abort ();
{
cpp_fatal (pfile, "internal error: length < 0 in cpp_expand_to_buffer");
return;
}
/* Set up the input on the input stack. */

View File

@ -37,24 +37,6 @@ char *progname;
cpp_reader parse_in;
cpp_options options;
#ifdef abort
/* More 'friendly' abort that prints the line and file.
config.h can #define abort fancy_abort if you like that sort of thing. */
void
fatal (s)
char *s;
{
fputs (s, stderr);
exit (FATAL_EXIT_CODE);
}
void
fancy_abort ()
{
fatal ("Internal gcc abort.");
}
#endif
int
main (argc, argv)