X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/71cb558dfe0f9c80e697308a5084de3b9926ee9c..e35cd6def7a19423a5f0fc566d844f6019df111a:/src/complain.c 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. */