X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/0db2648930e3b6c376a539aabe368aade83ee29a..3f5d1b2c67651a9d620946de421f2e51600b885e:/src/gram.c diff --git a/src/gram.c b/src/gram.c index d1b38043..5730e596 100644 --- a/src/gram.c +++ b/src/gram.c @@ -308,11 +308,16 @@ grammar_rules_useless_report (const char *message) for (r = 0; r < nrules ; ++r) if (!rules[r].useful) { - warn_at (rules[r].location, "%s: ", message); - if (warnings_flag & warnings_other) + if (feature_flag & feature_caret) + warn_at (rules[r].location, "%s", message); + else { - rule_print (&rules[r], stderr); - fflush (stderr); + warn_at (rules[r].location, "%s: ", message); + if (warnings_flag & warnings_other) + { + rule_print (&rules[r], stderr); + fflush (stderr); + } } } }