diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-04-14 09:40:56 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-04-14 09:40:56 +0000 |
commit | 47e49e31956f101e1854d3d9c4c60b7d8ba227b7 (patch) | |
tree | 5c0f7e812107a4a1edffd2adab583d43d11252a1 /gcc/cpphash.c | |
parent | aa1275a321e5f5b881b927fd7040fdc1104288a9 (diff) | |
download | gcc-47e49e31956f101e1854d3d9c4c60b7d8ba227b7.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26442 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.c')
-rw-r--r-- | gcc/cpphash.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/cpphash.c b/gcc/cpphash.c index 06de9d443ef..6e601a0fd5e 100644 --- a/gcc/cpphash.c +++ b/gcc/cpphash.c @@ -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 |