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]

Re: cpplib shouldn't be calling abort [patch]


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



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