merger_list *merge_functions;
/* Was %union seen? */
-bool typed = false;
+bool union_seen = false;
+
+/* Was a tag seen? */
+bool tag_seen = false;
/* Should rules have a default precedence? */
bool default_prec = true;
assert (merge_function != NULL && merger_find == merger);
if (merge_function->type != NULL && !UNIQSTR_EQ (merge_function->type, type))
{
- warn_at (declaration_loc,
- _("result type clash on merge function `%s': <%s> != <%s>"),
- merge_function->name, type, merge_function->type);
- warn_at (merge_function->type_declaration_location,
- _("previous declaration"));
+ complain_at (declaration_loc,
+ _("result type clash on merge function `%s': <%s> != <%s>"),
+ merge_function->name, type, merge_function->type);
+ complain_at (merge_function->type_declaration_location,
+ _("previous declaration"));
}
merge_function->type = uniqstr_new (type);
merge_function->type_declaration_location = declaration_loc;
static bool
symbol_should_be_used (symbol_list const *s)
{
- return (s->sym->destructor
+ return (symbol_destructor_get (s->sym)
|| (s->midrule && s->midrule->used));
}
rule. Thus, the midrule actions have already been scanned in order to
set `used' flags for this rule's rhs, so grammar_rule_check will work
properly. */
- grammar_rule_check (p);
+ /* Don't check the generated rule 0. It has no action, so some rhs
+ symbols may appear unused, but the parsing algorithm ensures that
+ %destructor's are invoked appropriately. */
+ if (p != grammar)
+ grammar_rule_check (p);
for (p = p->next; p && p->sym; p = p->next)
{