mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 17:23:02 +00:00
* src/complain.c, src/complain.h (error): Remove, provided by
lib/error.[ch].
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2001-11-26 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* src/complain.c, src/complain.h (error): Remove, provided by
|
||||||
|
lib/error.[ch].
|
||||||
|
|
||||||
2001-11-26 Akim Demaille <akim@epita.fr>
|
2001-11-26 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* src/reader.c (read_declarations): Don't abort on tok_illegal,
|
* src/reader.c (read_declarations): Don't abort on tok_illegal,
|
||||||
|
|||||||
3
NEWS
3
NEWS
@@ -3,6 +3,9 @@ Bison News
|
|||||||
|
|
||||||
Changes in version 1.30e:
|
Changes in version 1.30e:
|
||||||
|
|
||||||
|
* Error messages
|
||||||
|
Some calls to strerror resulted in scrambled or missing error messages.
|
||||||
|
|
||||||
* %expect
|
* %expect
|
||||||
When the number of shift/reduce conflicts is correct, don't issue
|
When the number of shift/reduce conflicts is correct, don't issue
|
||||||
any warning.
|
any warning.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Declaration for error-reporting function for Bison.
|
/* Declaration for error-reporting function for Bison.
|
||||||
Copyright 2000 Free Software Foundation, Inc.
|
Copyright 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by the
|
under the terms of the GNU General Public License as published by the
|
||||||
@@ -248,62 +248,3 @@ fatal (message, va_alist)
|
|||||||
fflush (stderr);
|
fflush (stderr);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*------------------------------------------------------------------.
|
|
||||||
| A severe error has occurred, we cannot proceed. Exit with STATUS, |
|
|
||||||
| and report the error message of the errno ERRNUM. |
|
|
||||||
`------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void
|
|
||||||
#if defined VA_START && defined __STDC__
|
|
||||||
error (int status, int errnum,
|
|
||||||
const char *message, ...)
|
|
||||||
#else
|
|
||||||
error (status, errnum, message, va_alist)
|
|
||||||
int status;
|
|
||||||
int errnum;
|
|
||||||
char *message;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
#ifdef VA_START
|
|
||||||
va_list args;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
fflush (stdout);
|
|
||||||
if (infile != NULL)
|
|
||||||
fprintf (stderr, "%s:%d: ", infile, lineno);
|
|
||||||
else
|
|
||||||
fprintf (stderr, "%s:", program_name);
|
|
||||||
|
|
||||||
fputs (_("fatal error: "), stderr);
|
|
||||||
|
|
||||||
#ifdef VA_START
|
|
||||||
VA_START (args, message);
|
|
||||||
vfprintf (stderr, message, args);
|
|
||||||
va_end (args);
|
|
||||||
#else
|
|
||||||
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (errnum)
|
|
||||||
{
|
|
||||||
#if defined HAVE_STRERROR_R || _LIBC
|
|
||||||
char errbuf[1024];
|
|
||||||
# if HAVE_WORKING_STRERROR_R || _LIBC
|
|
||||||
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
|
|
||||||
# else
|
|
||||||
/* Don't use __strerror_r's return value because on some systems
|
|
||||||
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
|
|
||||||
__strerror_r (errnum, errbuf, sizeof errbuf);
|
|
||||||
fprintf (stderr, ": %s", errbuf);
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
fprintf (stderr, ": %s", strerror (errnum));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
putc ('\n', stderr);
|
|
||||||
fflush (stderr);
|
|
||||||
if (status)
|
|
||||||
exit (status);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Declaration for error-reporting function for Bison.
|
/* Declaration for error-reporting function for Bison.
|
||||||
Copyright 2000 Free Software Foundation, Inc.
|
Copyright 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published by the
|
under the terms of the GNU General Public License as published by the
|
||||||
@@ -40,18 +40,10 @@ extern void complain (const char *format, ...)
|
|||||||
extern void fatal (const char *format, ...)
|
extern void fatal (const char *format, ...)
|
||||||
__attribute__ ((__format__ (__printf__, 1, 2)));
|
__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)));
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
void warn ();
|
void warn ();
|
||||||
void complain ();
|
void complain ();
|
||||||
void error ();
|
void fatal ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Position in the current input file. */
|
/* Position in the current input file. */
|
||||||
|
|||||||
Reference in New Issue
Block a user