mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 05:13:04 +00:00
Change %merge result type clash warnings to errors. Discussed at
<http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>. * src/reader.c (record_merge_function_type): Use complain_at. * tests/glr-regression.at (Missed %merge type warnings when LHS type is declared later): Update test case results.
This commit is contained in:
10
src/reader.c
10
src/reader.c
@@ -148,11 +148,11 @@ record_merge_function_type (int merger, uniqstr type, location declaration_loc)
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user