This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib shouldn't be calling abort [patch]
- To: Per Bothner <bothner at cygnus dot com>
- Subject: Re: cpplib shouldn't be calling abort [patch]
- From: Zack Weinberg <zack at rabi dot columbia dot edu>
- Date: Tue, 13 Apr 1999 17:26:21 -0400
- cc: brolley at cygnus dot com, egcs-patches at cygnus dot com
On Tue, 13 Apr 1999 12:24:37 -0700, Per Bothner wrote:
>> It appears to be a design feature of cpplib that it never calls
>> abort. (See the commentary above cpp_fatal, for example.)
>
>You misunderstand. There is a distinction between "fatal errors",
>which happen when the *input* is so messed-up that there is little
>point in continuing, and "aborts", which happen when the *program*
>is so confused (due to a bug in the program) that there is
>little point in continuing. If abort or exit is called, it
>is the same as a segfault: A bug in cpplib, which we should fix.
>(One might reasonably have calls to abort or exit where a program
>invariant is violated.)
In practice, it seems that cpp_fatal is used for both "fatal errors"
and "aborts" in cpplib. I'm just going for consistency here. I also
want to remove the dependency on the abort() magic in system.h.
zw