Error reporting in preprocessor broken
Andreas Schwab
schwab@issan.informatik.uni-dortmund.de
Mon Mar 15 01:28:00 GMT 1999
This patch fixes the error reporting in the preprocessor. See
gcc.c-torture/noncompile/951227-1.c.
1999-03-14 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* cexp.y (yyerror): Call verror to get a usefull error message.
--- egcs-2.93/gcc/cexp.y.~1~ Tue Mar 9 17:23:21 1999
+++ egcs-2.93/gcc/cexp.y Sun Mar 14 17:42:55 1999
@@ -137,6 +137,7 @@
int check_assertion PROTO((U_CHAR *, int, int, struct arglist *));
struct hashnode *lookup PROTO((U_CHAR *, int, int));
void error PVPROTO((const char *, ...)) ATTRIBUTE_PRINTF_1;
+void verror PROTO((const char *, va_list));
void pedwarn PVPROTO((const char *, ...)) ATTRIBUTE_PRINTF_1;
void warning PVPROTO((const char *, ...)) ATTRIBUTE_PRINTF_1;
@@ -1015,9 +1016,7 @@
msgid = va_arg (args, const char *);
#endif
- fprintf (stderr, "error: ");
- vfprintf (stderr, _(msgid), args);
- fprintf (stderr, "\n");
+ verror (msgid, args);
va_end (args);
skip_evaluation = 0;
longjmp (parse_return_error, 1);
--
Andreas Schwab "And now for something
schwab@issan.cs.uni-dortmund.de completely different"
schwab@gnu.org
More information about the Gcc-patches
mailing list