diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d6bc063202c73ee87e40ec96ad43275a33d4c09c..0cd464bb734e5a81d906a73269f3425ed56be936 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/toplev.h b/gcc/toplev.h index 6880e9fcc76004ba4b404f9710a8d85d80e691b8..bed92ae63a908dab3de385758af28ceb0a8434d8 100644 --- a/gcc/toplev.h +++ b/gcc/toplev.h @@ -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; diff --git a/gcc/tradcif.y b/gcc/tradcif.y index 877489d0a9e98031fe23dddc93f7c991dc0b9def..5def3c97fa773951ad41729ec058f917ecb9f0d1 100644 --- a/gcc/tradcif.y +++ b/gcc/tradcif.y @@ -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); } diff --git a/gcc/tradcpp.c b/gcc/tradcpp.c index 82de0bb7d693993b8645838ff7c543fcd70ec752..d5674736f476201f43c35bad3c34aecd02101501 100644 --- a/gcc/tradcpp.c +++ b/gcc/tradcpp.c @@ -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++;