[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: redeclarations: say "previous" not "first" declaration
From: |
Joel E. Denny |
Subject: |
Re: redeclarations: say "previous" not "first" declaration |
Date: |
Sun, 9 Jul 2006 12:38:30 -0400 (EDT) |
On Sun, 9 Jul 2006, Joel E. Denny wrote:
> As we discussed, I'll convert the merge type clash warnings to errors.
I committted this.
Joel
Index: ChangeLog
===================================================================
RCS file: /sources/bison/bison/ChangeLog,v
retrieving revision 1.1528
diff -p -u -r1.1528 ChangeLog
--- ChangeLog 9 Jul 2006 15:38:41 -0000 1.1528
+++ ChangeLog 9 Jul 2006 16:34:17 -0000
@@ -1,3 +1,11 @@
+2006-07-09 Joel E. Denny <address@hidden>
+
+ 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.
+
2006-07-09 Akim Demaille <address@hidden>
* src/getargs.h, src/getargs.c: Swap --report and --trace handling
Index: src/reader.c
===================================================================
RCS file: /sources/bison/bison/src/reader.c,v
retrieving revision 1.263
diff -p -u -r1.263 reader.c
--- src/reader.c 7 Jul 2006 21:25:03 -0000 1.263
+++ src/reader.c 9 Jul 2006 16:34:19 -0000
@@ -148,11 +148,11 @@ record_merge_function_type (int merger,
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;
Index: tests/glr-regression.at
===================================================================
RCS file: /sources/bison/bison/tests/glr-regression.at,v
retrieving revision 1.38
diff -p -u -r1.38 glr-regression.at
--- tests/glr-regression.at 7 Jul 2006 21:25:03 -0000 1.38
+++ tests/glr-regression.at 9 Jul 2006 16:34:19 -0000
@@ -1713,11 +1713,11 @@ main (void)
}
]])
-AT_CHECK([[bison -o glr-regr18.c glr-regr18.y]], 0, [],
-[glr-regr18.y:27.18-24: warning: result type clash on merge function `merge':
<type2> != <type1>
-glr-regr18.y:26.18-24: warning: previous declaration
-glr-regr18.y:28.13-19: warning: result type clash on merge function `merge':
<type3> != <type2>
-glr-regr18.y:27.18-24: warning: previous declaration
+AT_CHECK([[bison -o glr-regr18.c glr-regr18.y]], 1, [],
+[glr-regr18.y:27.18-24: result type clash on merge function `merge': <type2>
!= <type1>
+glr-regr18.y:26.18-24: previous declaration
+glr-regr18.y:28.13-19: result type clash on merge function `merge': <type3> !=
<type2>
+glr-regr18.y:27.18-24: previous declaration
])
AT_CLEANUP