X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/f6b561d9f9cbc6fc95bbb86518372a5cb52f45a6..758f7cfc1498ec58ab667a48365155851d66a70a:/src/gram.c diff --git a/src/gram.c b/src/gram.c index f58ac3b5..dbcf8a21 100644 --- a/src/gram.c +++ b/src/gram.c @@ -312,10 +312,15 @@ grammar_rules_useless_report (const char *message) for (r = 0; r < nrules ; ++r) if (!rules[r].useful) { - complain (&rules[r].location, w | silent, "%s: ", message); - rule_print (&rules[r], stderr); - warnings_print_categories (w); - fprintf (stderr, "\n"); + if (feature_flag & feature_caret) + complain (&rules[r].location, w, "%s", message); + else + { + complain (&rules[r].location, w | silent, "%s: ", message); + rule_print (&rules[r], stderr); + warnings_print_categories (w); + fprintf (stderr, "\n"); + } } } }