toplev.h (fatal_error): Add ATTRIBUTE_NORETURN.

* toplev.h (fatal_error): Add ATTRIBUTE_NORETURN.

	* tradcif.y (yyerror): Likewise.  Add format specifier in call to
	`error'.

	* tradcpp.c (macroexpand): Likewise for call to `error_with_line'.

From-SVN: r40939
This commit is contained in:
Kaveh R. Ghazi 2001-03-28 19:24:11 +00:00 committed by Kaveh Ghazi
parent 883e9882ff
commit 3fdefbcc63
4 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,12 @@
2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* toplev.h (fatal_error): Add ATTRIBUTE_NORETURN.
* tradcif.y (yyerror): Likewise. Add format specifier in call to
`error'.
* tradcpp.c (macroexpand): Likewise for call to `error_with_line'.
2001-03-28 DJ Delorie <dj@redhat.com>
* Makefile.in (stage1_build): Revert CFLAGS patch.

View File

@ -69,6 +69,7 @@ extern void warning PARAMS ((const char *, ...))
extern void error PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1;
extern void fatal_error PARAMS ((const char *, ...))
ATTRIBUTE_NORETURN
ATTRIBUTE_PRINTF_1;
extern void pedwarn PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1;

View File

@ -28,7 +28,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <setjmp.h>
static int yylex PARAMS ((void));
static void yyerror PARAMS ((const char *msgid));
static void yyerror PARAMS ((const char *msgid)) ATTRIBUTE_NORETURN;
static int parse_number PARAMS ((int));
static int parse_escape PARAMS ((const char **));
@ -537,7 +537,7 @@ static void
yyerror (s)
const char *s;
{
error (s);
error ("%s", s);
longjmp (parse_return_error, 1);
}

View File

@ -4020,7 +4020,7 @@ macroexpand (hp, op)
= macarg ((i < nargs || (nargs == 0 && i == 0)) ? &args[i] : 0);
if (parse_error)
{
error_with_line (line_for_error (start_line), parse_error);
error_with_line (line_for_error (start_line), "%s", parse_error);
break;
}
i++;