X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/06ec0105b12cdfa2994283e345154e6720354808..0fe9720964da510a2b359af390a3053aace65f9f:/src/complain.c diff --git a/src/complain.c b/src/complain.c index 2e4e71af..984b1361 100644 --- a/src/complain.c +++ b/src/complain.c @@ -110,12 +110,15 @@ error_message (const location *loc, warnings flags, const char *prefix, warnings_print_categories (flags); { size_t l = strlen (message); - if (l < 2 || message[l-2] != ':' || message[l-1] != ' ') + if (l < 2 || message[l - 2] != ':' || message[l - 1] != ' ') { putc ('\n', stderr); fflush (stderr); + if (loc && feature_flag & feature_caret && !(flags & no_caret)) + location_caret (stderr, *loc); } } + fflush (stderr); } /** Raise a complaint. That can be a fatal error, a complaint or just a