X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/df04a68ab54dcd8b899532c51ed0c8e1a0486296..c49e2f153521a86f22b2631ca8a1fb6389c3a70e:/src/complain.c?ds=sidebyside diff --git a/src/complain.c b/src/complain.c index b063c6b6..ede0ccf4 100644 --- a/src/complain.c +++ b/src/complain.c @@ -74,11 +74,15 @@ error_message (location *loc, vfprintf (stderr, message, args); { size_t l = strlen (message); - if (l < 2 || message[l-2] != ':' || message[l-1] != ' ') { - putc ('\n', stderr); - fflush (stderr); - } + if (l < 2 || message[l - 2] != ':' || message[l - 1] != ' ') + { + putc ('\n', stderr); + fflush (stderr); + if (loc && feature_flag & feature_caret) + location_caret (stderr, *loc); + } } + fflush (stderr); } /** Wrap error_message() with varargs handling. */