mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-23 03:03:02 +00:00
(grammar_current_rule_check): Warn about
type clashes instead of complaining.
This commit is contained in:
10
src/reader.c
10
src/reader.c
@@ -260,14 +260,14 @@ grammar_current_rule_check (void)
|
|||||||
{
|
{
|
||||||
const char *rhs_type = first_rhs->type_name ? first_rhs->type_name : "";
|
const char *rhs_type = first_rhs->type_name ? first_rhs->type_name : "";
|
||||||
if (!STRUNIQ_EQ (lhs_type, rhs_type))
|
if (!STRUNIQ_EQ (lhs_type, rhs_type))
|
||||||
complain_at (current_rule->location,
|
warn_at (current_rule->location,
|
||||||
_("type clash on default action: <%s> != <%s>"),
|
_("type clash on default action: <%s> != <%s>"),
|
||||||
lhs_type, rhs_type);
|
lhs_type, rhs_type);
|
||||||
}
|
}
|
||||||
/* Warn if there is no default for $$ but we need one. */
|
/* Warn if there is no default for $$ but we need one. */
|
||||||
else
|
else
|
||||||
complain_at (current_rule->location,
|
warn_at (current_rule->location,
|
||||||
_("empty rule for typed nonterminal, and no action"));
|
_("empty rule for typed nonterminal, and no action"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user