Apparent merge lossage in cexp.y

Zack Weinberg zack@rabi.columbia.edu
Thu Mar 11 16:51:00 GMT 1999


Certain syntax errors in #if statements wouldn't be reported with a
line number.  I think this was merge lossage, since cpp from 1.1.1
gets it right.

I am not certain about calling verror() from here, but it works.

zw

1999-03-11 19:49 -0500  Zack Weinberg  <zack@rabi.phys.columbia.edu>

	* cexp.y (yyerror): Use verror so line and file will be	reported.

============================================================
Index: cexp.y
--- cexp.y	1999/03/06 05:34:11	1.14
+++ cexp.y	1999/03/12 00:47:31
@@ -1004,6 +1004,7 @@
 static void
 yyerror VPROTO ((const char * msgid, ...))
 {
+  extern void verror PROTO ((const char *, va_list));
 #ifndef ANSI_PROTOTYPES
   const char * msgid;
 #endif
@@ -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);


More information about the Gcc-patches mailing list