X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/4c9b8f1318c68238074ee19e7ab976a22924540e..0fe5a72a262cd4680513d135e1161f345fc3afb1:/src/complain.c diff --git a/src/complain.c b/src/complain.c index 44e1b1ea..2e87097f 100644 --- a/src/complain.c +++ b/src/complain.c @@ -365,3 +365,13 @@ deprecated_directive (location const *loc, char const *old, char const *upd) _("deprecated directive: %s, use %s"), quote (old), quote_n (1, upd)); } + +void +duplicate_directive (char const *directive, + location first, location second) +{ + unsigned i = 0; + complain (&second, complaint, _("only one %s allowed per rule"), directive); + i += SUB_INDENT; + complain_indent (&first, complaint, &i, _("previous declaration")); +}