[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison-1.28 No Error Bug
From: |
Akim Demaille |
Subject: |
Re: Bison-1.28 No Error Bug |
Date: |
04 Oct 2000 10:38:46 +0200 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
>>>>> "Hans" == Hans Aberg <address@hidden> writes:
>> That's the approach advocated in the current beta. It is still
>> unsatisfying: there are too many such functions (see
>> complain.[ch]).
Hans> For the port, I want as few as possible, because it's easier to
Hans> feed them into the IDE message display. In order to prevent
Hans> mistakes with f(...) arguments, one can first define the single
Hans> warn() above, and then all the other warnx wrapping around it.
We must have misunderstood each other. Warn, warni, warns etc. are
dead, but now there is
/* Informative messages, but we proceed. */
extern void warn (const char *format, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
/* Something bad happen, but let's continue and die later. */
extern void complain (const char *format, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
/* Something bad happen and we die now. */
extern void fatal (const char *format, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
/* Print a message with `fprintf (stderr, FORMAT, ...)';
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
extern void error (int status, int errnum,
const char *format, ...)
__attribute__ ((__format__ (__printf__, 3, 4)));
If you find a means to factor this without cluttering bison's sources,
then fine, but clarity, simplicity and maintainability of the sources
of Bison are more important for us than interfacing with IDEs :(