mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 21:33:04 +00:00
warnings: sort the messages by location
Sort the warnings by location (file, line number, column). They are built using an obstack then stored in a list, and finally sorted just before being printed, at the end. * src/complain.c, src/complain.h: New warning struct, obstack, and implementation * src/location.c, location.h (location_obstack_caret, location_obstack_print): New * src/main.c: Print the warnings * src/muscle-tab.c, src/reader.c, src/scan-code.l, src/symtab.c: Adapt for multi-part warnings * tests/actions.at, tests/conflicts.at, tests/existing.at, tests/input.at, * tests/reduce.at, tests/regression.at, tests/skeleton.at: Update testsuite
This commit is contained in:
@@ -1385,8 +1385,8 @@ AT_BISON_OPTION_POPDEFS
|
||||
AT_BISON_CHECK([-o input.c input.y], 0,,
|
||||
[[input.y:24.70-72: warning: useless %destructor for type <*> [-Wother]
|
||||
input.y:24.70-72: warning: useless %printer for type <*> [-Wother]
|
||||
input.y:33.3-23: warning: unset value: $$ [-Wother]
|
||||
input.y:32.3-23: warning: unused value: $3 [-Wother]
|
||||
input.y:33.3-23: warning: unset value: $$ [-Wother]
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([-fcaret -o input.c input.y], 0,,
|
||||
@@ -1396,12 +1396,12 @@ AT_BISON_CHECK([-fcaret -o input.c input.y], 0,,
|
||||
input.y:24.70-72: warning: useless %printer for type <*> [-Wother]
|
||||
%printer { fprintf (yyoutput, "<*> printer should not be called"); } <*>
|
||||
^^^
|
||||
input.y:33.3-23: warning: unset value: $$ [-Wother]
|
||||
{ @$ = 4; } // Only used.
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
input.y:32.3-23: warning: unused value: $3 [-Wother]
|
||||
{ USE ($$); @$ = 3; } // Only set.
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
input.y:33.3-23: warning: unset value: $$ [-Wother]
|
||||
{ @$ = 4; } // Only used.
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
]])
|
||||
|
||||
AT_COMPILE([input])
|
||||
|
||||
@@ -243,18 +243,18 @@ f: B
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([-Wprecedence -fcaret -o input.c input.y], 0, [],
|
||||
[[input.y:7.1-9: warning: useless precedence and associativity for U [-Wprecedence]
|
||||
%nonassoc U
|
||||
^^^^^^^^^
|
||||
input.y:6.1-6: warning: useless precedence and associativity for V [-Wprecedence]
|
||||
%right V
|
||||
^^^^^^
|
||||
[[input.y:2.1-11: warning: useless precedence for Z [-Wprecedence]
|
||||
%precedence Z
|
||||
^^^^^^^^^^^
|
||||
input.y:5.1-5: warning: useless precedence and associativity for W [-Wprecedence]
|
||||
%left W
|
||||
^^^^^
|
||||
input.y:2.1-11: warning: useless precedence for Z [-Wprecedence]
|
||||
%precedence Z
|
||||
^^^^^^^^^^^
|
||||
input.y:6.1-6: warning: useless precedence and associativity for V [-Wprecedence]
|
||||
%right V
|
||||
^^^^^^
|
||||
input.y:7.1-9: warning: useless precedence and associativity for U [-Wprecedence]
|
||||
%nonassoc U
|
||||
^^^^^^^^^
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
@@ -1006,8 +1006,8 @@ cond:
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([-o input.c input.y], 0, [],
|
||||
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
|
||||
input.y:12.3-18: warning: rule useless in parser due to conflicts [-Wother]
|
||||
[[input.y:12.3-18: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
@@ -1050,8 +1050,8 @@ id : '0';
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([-o input.c --report=all input.y], 0, [],
|
||||
[[input.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
|
||||
input.y:4.6-8: warning: rule useless in parser due to conflicts [-Wother]
|
||||
[[input.y:4.6-8: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
|
||||
]])
|
||||
|
||||
# Check the contents of the report.
|
||||
@@ -1265,9 +1265,9 @@ e: e '+' e
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([-Wall -o input.c input.y], 0, [],
|
||||
[[input.y: warning: 4 shift/reduce conflicts [-Wconflicts-sr]
|
||||
input.y:1.1-5: warning: useless precedence and associativity for '+' [-Wprecedence]
|
||||
[[input.y:1.1-5: warning: useless precedence and associativity for '+' [-Wprecedence]
|
||||
input.y:2.1-5: warning: useless precedence and associativity for '*' [-Wprecedence]
|
||||
input.y: warning: 4 shift/reduce conflicts [-Wconflicts-sr]
|
||||
]])
|
||||
AT_CLEANUP
|
||||
|
||||
@@ -1369,15 +1369,15 @@ reported_conflicts:
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[--report=all input.y]], 0, [],
|
||||
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
|
||||
input.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
|
||||
input.y:12.5-20: warning: rule useless in parser due to conflicts [-Wother]
|
||||
[[input.y:12.5-20: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input.y:20.5-20: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input.y:21.4: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input.y:25.13: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input.y:25.16: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input.y:31.5-7: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input.y:32.4: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
|
||||
input.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
|
||||
]])
|
||||
|
||||
AT_CHECK([[cat input.output]], 0,
|
||||
@@ -1522,12 +1522,12 @@ AT_DATA([[input-keep.y]],
|
||||
AT_CHECK([[cat input.y >> input-keep.y]])
|
||||
|
||||
AT_BISON_CHECK([[input-keep.y]], 0, [],
|
||||
[[input-keep.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
|
||||
input-keep.y: warning: 2 reduce/reduce conflicts [-Wconflicts-rr]
|
||||
input-keep.y:22.4: warning: rule useless in parser due to conflicts [-Wother]
|
||||
[[input-keep.y:22.4: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input-keep.y:26.16: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input-keep.y:32.5-7: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input-keep.y:33.4: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input-keep.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
|
||||
input-keep.y: warning: 2 reduce/reduce conflicts [-Wconflicts-rr]
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
@@ -1705,9 +1705,9 @@ exp: 'a' | 'a';
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[2.y]], [[0]], [],
|
||||
[[2.y: warning: %expect-rr applies only to GLR parsers [-Wother]
|
||||
[[2.y:3.12-14: warning: rule useless in parser due to conflicts [-Wother]
|
||||
2.y: warning: %expect-rr applies only to GLR parsers [-Wother]
|
||||
2.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
|
||||
2.y:3.12-14: warning: rule useless in parser due to conflicts [-Wother]
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
@@ -426,7 +426,25 @@ dnl don't like even 'print $!4;'.
|
||||
[[LEX_GETLINE, '$', '!', YNUMBER, '*', YNUMBER, ';']],
|
||||
|
||||
dnl BISON-STDERR
|
||||
[[input.y:66.10: warning: empty rule without %empty [-Wempty-rule]
|
||||
[[input.y:33.1-6: warning: useless associativity for ASSIGNOP, use %precedence [-Wprecedence]
|
||||
input.y:37.1-5: warning: useless precedence and associativity for LEX_GETLINE [-Wprecedence]
|
||||
input.y:38.1-9: warning: useless associativity for LEX_IN, use %precedence [-Wprecedence]
|
||||
input.y:39.1-5: warning: useless associativity for FUNC_CALL, use %precedence [-Wprecedence]
|
||||
input.y:39.1-5: warning: useless associativity for LEX_BUILTIN, use %precedence [-Wprecedence]
|
||||
input.y:39.1-5: warning: useless associativity for LEX_LENGTH, use %precedence [-Wprecedence]
|
||||
input.y:40.1-9: warning: useless precedence and associativity for ',' [-Wprecedence]
|
||||
input.y:42.1-9: warning: useless precedence and associativity for APPEND_OP [-Wprecedence]
|
||||
input.y:43.1-5: warning: useless associativity for CONCAT_OP, use %precedence [-Wprecedence]
|
||||
input.y:44.1-5: warning: useless associativity for YNUMBER, use %precedence [-Wprecedence]
|
||||
input.y:44.1-5: warning: useless associativity for YSTRING, use %precedence [-Wprecedence]
|
||||
input.y:47.1-6: warning: useless associativity for '!', use %precedence [-Wprecedence]
|
||||
input.y:47.1-6: warning: useless associativity for UNARY, use %precedence [-Wprecedence]
|
||||
input.y:49.1-5: warning: useless associativity for INCREMENT, use %precedence [-Wprecedence]
|
||||
input.y:49.1-5: warning: useless associativity for DECREMENT, use %precedence [-Wprecedence]
|
||||
input.y:50.1-5: warning: useless associativity for '$', use %precedence [-Wprecedence]
|
||||
input.y:51.1-5: warning: useless associativity for '(', use %precedence [-Wprecedence]
|
||||
input.y:51.1-5: warning: useless precedence and associativity for ')' [-Wprecedence]
|
||||
input.y:66.10: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:169.8: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:174.12: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:179.13: warning: empty rule without %empty [-Wempty-rule]
|
||||
@@ -439,24 +457,6 @@ input.y:322.9: warning: empty rule without %empty [-Wempty-rule]
|
||||
]AT_COND_CASE([[canonical LR]],
|
||||
[[input.y: warning: 265 shift/reduce conflicts [-Wconflicts-sr]]],
|
||||
[[input.y: warning: 65 shift/reduce conflicts [-Wconflicts-sr]]])[
|
||||
input.y:39.1-5: warning: useless associativity for FUNC_CALL, use %precedence [-Wprecedence]
|
||||
input.y:44.1-5: warning: useless associativity for YNUMBER, use %precedence [-Wprecedence]
|
||||
input.y:44.1-5: warning: useless associativity for YSTRING, use %precedence [-Wprecedence]
|
||||
input.y:42.1-9: warning: useless precedence and associativity for APPEND_OP [-Wprecedence]
|
||||
input.y:33.1-6: warning: useless associativity for ASSIGNOP, use %precedence [-Wprecedence]
|
||||
input.y:43.1-5: warning: useless associativity for CONCAT_OP, use %precedence [-Wprecedence]
|
||||
input.y:37.1-5: warning: useless precedence and associativity for LEX_GETLINE [-Wprecedence]
|
||||
input.y:38.1-9: warning: useless associativity for LEX_IN, use %precedence [-Wprecedence]
|
||||
input.y:49.1-5: warning: useless associativity for INCREMENT, use %precedence [-Wprecedence]
|
||||
input.y:49.1-5: warning: useless associativity for DECREMENT, use %precedence [-Wprecedence]
|
||||
input.y:39.1-5: warning: useless associativity for LEX_BUILTIN, use %precedence [-Wprecedence]
|
||||
input.y:39.1-5: warning: useless associativity for LEX_LENGTH, use %precedence [-Wprecedence]
|
||||
input.y:40.1-9: warning: useless precedence and associativity for ',' [-Wprecedence]
|
||||
input.y:47.1-6: warning: useless associativity for '!', use %precedence [-Wprecedence]
|
||||
input.y:47.1-6: warning: useless associativity for UNARY, use %precedence [-Wprecedence]
|
||||
input.y:50.1-5: warning: useless associativity for '$', use %precedence [-Wprecedence]
|
||||
input.y:51.1-5: warning: useless associativity for '(', use %precedence [-Wprecedence]
|
||||
input.y:51.1-5: warning: useless precedence and associativity for ')' [-Wprecedence]
|
||||
]],
|
||||
|
||||
dnl LAST-STATE
|
||||
@@ -1395,7 +1395,13 @@ dnl INPUT
|
||||
[[]],
|
||||
|
||||
dnl BISON-STDERR
|
||||
[[input.y:128.12: warning: empty rule without %empty [-Wempty-rule]
|
||||
[[input.y:53.1-6: warning: useless associativity for HASSIGN, use %precedence [-Wprecedence]
|
||||
input.y:54.1-5: warning: useless associativity for HORELSE, use %precedence [-Wprecedence]
|
||||
input.y:55.1-5: warning: useless associativity for HANDTHEN, use %precedence [-Wprecedence]
|
||||
input.y:61.1-5: warning: useless associativity for HNOT, use %precedence [-Wprecedence]
|
||||
input.y:68.1-5: warning: useless associativity for UNEAR, use %precedence [-Wprecedence]
|
||||
input.y:72.1-5: warning: useless associativity for HQUA, use %precedence [-Wprecedence]
|
||||
input.y:128.12: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:137.10: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:142.8: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:161.15: warning: empty rule without %empty [-Wempty-rule]
|
||||
@@ -1422,12 +1428,6 @@ input.y:591.14: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y: warning: 144 reduce/reduce conflicts [-Wconflicts-rr]]],
|
||||
[[input.y: warning: 78 shift/reduce conflicts [-Wconflicts-sr]
|
||||
input.y: warning: 10 reduce/reduce conflicts [-Wconflicts-rr]]])[
|
||||
input.y:72.1-5: warning: useless associativity for HQUA, use %precedence [-Wprecedence]
|
||||
input.y:53.1-6: warning: useless associativity for HASSIGN, use %precedence [-Wprecedence]
|
||||
input.y:54.1-5: warning: useless associativity for HORELSE, use %precedence [-Wprecedence]
|
||||
input.y:55.1-5: warning: useless associativity for HANDTHEN, use %precedence [-Wprecedence]
|
||||
input.y:61.1-5: warning: useless associativity for HNOT, use %precedence [-Wprecedence]
|
||||
input.y:68.1-5: warning: useless associativity for UNEAR, use %precedence [-Wprecedence]
|
||||
]],
|
||||
|
||||
dnl LAST-STATE
|
||||
@@ -2009,57 +2009,27 @@ dnl without being followed by "of".)
|
||||
[[VARIABLE, '=', LABEL, LEFT, DOT_X]],
|
||||
|
||||
dnl BISON-STDERR
|
||||
[[input.y:202.19: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:270.6: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:292.12: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:309.17: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:382.13: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:471.11-48: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input.y:154.1-5: warning: useless associativity for LABEL, use %precedence [-Wprecedence]
|
||||
input.y:156.1-5: warning: useless associativity for VARIABLE, use %precedence [-Wprecedence]
|
||||
input.y:156.1-5: warning: useless associativity for NUMBER, use %precedence [-Wprecedence]
|
||||
[[input.y:137.1-5: warning: useless associativity for '.', use %precedence [-Wprecedence]
|
||||
input.y:140.1-5: warning: useless associativity for PLOT, use %precedence [-Wprecedence]
|
||||
input.y:141.1-5: warning: useless associativity for TEXT, use %precedence [-Wprecedence]
|
||||
input.y:157.1-5: warning: useless associativity for ORDINAL, use %precedence [-Wprecedence]
|
||||
input.y:156.1-5: warning: useless associativity for LAST, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless associativity for UP, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless associativity for DOWN, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for BOX, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for CIRCLE, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for ELLIPSE, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for ARC, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for LINE, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for ARROW, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for SPLINE, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for HEIGHT, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for RADIUS, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for WIDTH, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for DIAMETER, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for FROM, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for TO, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for AT, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless precedence and associativity for SOLID [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless associativity for DOTTED, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless associativity for DASHED, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless associativity for CHOP, use %precedence [-Wprecedence]
|
||||
input.y:141.1-5: warning: useless associativity for SPRINTF, use %precedence [-Wprecedence]
|
||||
input.y:147.1-5: warning: useless precedence and associativity for LJUST [-Wprecedence]
|
||||
input.y:147.1-5: warning: useless precedence and associativity for RJUST [-Wprecedence]
|
||||
input.y:147.1-5: warning: useless precedence and associativity for ABOVE [-Wprecedence]
|
||||
input.y:147.1-5: warning: useless precedence and associativity for BELOW [-Wprecedence]
|
||||
input.y:176.1-5: warning: useless associativity for OF, use %precedence [-Wprecedence]
|
||||
input.y:176.1-5: warning: useless associativity for BETWEEN, use %precedence [-Wprecedence]
|
||||
input.y:177.1-5: warning: useless associativity for AND, use %precedence [-Wprecedence]
|
||||
input.y:157.1-5: warning: useless associativity for HERE, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_N, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_E, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_W, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_S, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_NE, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_SE, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_NW, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_SW, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_C, use %precedence [-Wprecedence]
|
||||
input.y:167.1-5: warning: useless associativity for DOT_START, use %precedence [-Wprecedence]
|
||||
input.y:167.1-5: warning: useless associativity for DOT_END, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless associativity for UP, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless associativity for DOWN, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless precedence and associativity for SOLID [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless associativity for DOTTED, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless associativity for DASHED, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless associativity for CHOP, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless associativity for FILL, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless precedence and associativity for COLORED [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless precedence and associativity for OUTLINED [-Wprecedence]
|
||||
input.y:154.1-5: warning: useless associativity for LABEL, use %precedence [-Wprecedence]
|
||||
input.y:156.1-5: warning: useless associativity for VARIABLE, use %precedence [-Wprecedence]
|
||||
input.y:156.1-5: warning: useless associativity for NUMBER, use %precedence [-Wprecedence]
|
||||
input.y:156.1-5: warning: useless associativity for LAST, use %precedence [-Wprecedence]
|
||||
input.y:156.1-5: warning: useless associativity for SIN, use %precedence [-Wprecedence]
|
||||
input.y:156.1-5: warning: useless associativity for COS, use %precedence [-Wprecedence]
|
||||
input.y:156.1-5: warning: useless associativity for ATAN2, use %precedence [-Wprecedence]
|
||||
@@ -2071,12 +2041,43 @@ input.y:156.1-5: warning: useless associativity for K_MIN, use %precedence [-Wpr
|
||||
input.y:156.1-5: warning: useless associativity for INT, use %precedence [-Wprecedence]
|
||||
input.y:156.1-5: warning: useless associativity for RAND, use %precedence [-Wprecedence]
|
||||
input.y:156.1-5: warning: useless associativity for SRAND, use %precedence [-Wprecedence]
|
||||
input.y:156.1-5: warning: useless associativity for '(', use %precedence [-Wprecedence]
|
||||
input.y:157.1-5: warning: useless associativity for ORDINAL, use %precedence [-Wprecedence]
|
||||
input.y:157.1-5: warning: useless associativity for HERE, use %precedence [-Wprecedence]
|
||||
input.y:157.1-5: warning: useless associativity for '`', use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for BOX, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for CIRCLE, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for ELLIPSE, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for ARC, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for LINE, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for ARROW, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for SPLINE, use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for '@<:@', use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for HEIGHT, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for RADIUS, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for WIDTH, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for DIAMETER, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for FROM, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for TO, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for AT, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for THICKNESS, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_N, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_E, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_W, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_S, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_NE, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_SE, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_NW, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_SW, use %precedence [-Wprecedence]
|
||||
input.y:166.1-5: warning: useless associativity for DOT_C, use %precedence [-Wprecedence]
|
||||
input.y:167.1-5: warning: useless associativity for DOT_START, use %precedence [-Wprecedence]
|
||||
input.y:167.1-5: warning: useless associativity for DOT_END, use %precedence [-Wprecedence]
|
||||
input.y:167.1-5: warning: useless associativity for TOP, use %precedence [-Wprecedence]
|
||||
input.y:167.1-5: warning: useless associativity for BOTTOM, use %precedence [-Wprecedence]
|
||||
input.y:168.1-5: warning: useless associativity for UPPER, use %precedence [-Wprecedence]
|
||||
input.y:168.1-5: warning: useless associativity for LOWER, use %precedence [-Wprecedence]
|
||||
input.y:167.1-5: warning: useless associativity for LEFT_CORNER, use %precedence [-Wprecedence]
|
||||
input.y:167.1-5: warning: useless associativity for RIGHT_CORNER, use %precedence [-Wprecedence]
|
||||
input.y:168.1-5: warning: useless associativity for UPPER, use %precedence [-Wprecedence]
|
||||
input.y:168.1-5: warning: useless associativity for LOWER, use %precedence [-Wprecedence]
|
||||
input.y:168.1-5: warning: useless associativity for NORTH, use %precedence [-Wprecedence]
|
||||
input.y:168.1-5: warning: useless associativity for SOUTH, use %precedence [-Wprecedence]
|
||||
input.y:168.1-5: warning: useless associativity for EAST, use %precedence [-Wprecedence]
|
||||
@@ -2084,18 +2085,17 @@ input.y:168.1-5: warning: useless associativity for WEST, use %precedence [-Wpre
|
||||
input.y:168.1-5: warning: useless associativity for CENTER, use %precedence [-Wprecedence]
|
||||
input.y:168.1-5: warning: useless associativity for END, use %precedence [-Wprecedence]
|
||||
input.y:168.1-5: warning: useless associativity for START, use %precedence [-Wprecedence]
|
||||
input.y:140.1-5: warning: useless associativity for PLOT, use %precedence [-Wprecedence]
|
||||
input.y:162.1-5: warning: useless associativity for THICKNESS, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless associativity for FILL, use %precedence [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless precedence and associativity for COLORED [-Wprecedence]
|
||||
input.y:153.1-5: warning: useless precedence and associativity for OUTLINED [-Wprecedence]
|
||||
input.y:141.1-5: warning: useless associativity for SPRINTF, use %precedence [-Wprecedence]
|
||||
input.y:137.1-5: warning: useless associativity for '.', use %precedence [-Wprecedence]
|
||||
input.y:156.1-5: warning: useless associativity for '(', use %precedence [-Wprecedence]
|
||||
input.y:157.1-5: warning: useless associativity for '`', use %precedence [-Wprecedence]
|
||||
input.y:159.1-5: warning: useless associativity for '@<:@', use %precedence [-Wprecedence]
|
||||
input.y:170.1-5: warning: useless associativity for ',', use %precedence [-Wprecedence]
|
||||
input.y:176.1-5: warning: useless associativity for OF, use %precedence [-Wprecedence]
|
||||
input.y:176.1-5: warning: useless associativity for BETWEEN, use %precedence [-Wprecedence]
|
||||
input.y:177.1-5: warning: useless associativity for AND, use %precedence [-Wprecedence]
|
||||
input.y:181.1-6: warning: useless associativity for '!', use %precedence [-Wprecedence]
|
||||
input.y:202.19: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:270.6: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:292.12: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:309.17: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:382.13: warning: empty rule without %empty [-Wempty-rule]
|
||||
input.y:471.11-48: warning: rule useless in parser due to conflicts [-Wother]
|
||||
]],
|
||||
|
||||
dnl LAST-STATE
|
||||
|
||||
106
tests/input.at
106
tests/input.at
@@ -142,15 +142,15 @@ exp: foo { $$; } foo { $2; } foo
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([-fcaret input.y], [1], [],
|
||||
[[input.y:5.12-13: error: $$ for the midrule at $2 of 'exp' has no declared type
|
||||
[[input.y:5.6-32: warning: type clash on default action: <bar> != <> [-Wother]
|
||||
exp: foo { $$; } foo { $2; } foo
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
input.y:5.12-13: error: $$ for the midrule at $2 of 'exp' has no declared type
|
||||
exp: foo { $$; } foo { $2; } foo
|
||||
^^
|
||||
input.y:5.24-25: error: $2 of 'exp' has no declared type
|
||||
exp: foo { $$; } foo { $2; } foo
|
||||
^^
|
||||
input.y:5.6-32: warning: type clash on default action: <bar> != <> [-Wother]
|
||||
exp: foo { $$; } foo { $2; } foo
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
input.y:6.6-8: warning: type clash on default action: <bar> != <> [-Wother]
|
||||
| foo
|
||||
^^^
|
||||
@@ -208,12 +208,12 @@ _AT_UNUSED_VALUES_DECLARATIONS])
|
||||
|
||||
AT_BISON_CHECK(m4_ifval($2, [--warnings=midrule-values ])[-fcaret input.y],
|
||||
[0], [],
|
||||
[[input.y:11.10-32: warning: unset value: $][$ [-Wother]
|
||||
a: INT | INT { } INT { } INT { };
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
input.y:11.10-12: warning: unused value: $][1 [-Wother]
|
||||
[[input.y:11.10-12: warning: unused value: $][1 [-Wother]
|
||||
a: INT | INT { } INT { } INT { };
|
||||
^^^
|
||||
input.y:11.10-32: warning: unset value: $][$ [-Wother]
|
||||
a: INT | INT { } INT { } INT { };
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
input.y:11.18-20: warning: unused value: $][3 [-Wother]
|
||||
a: INT | INT { } INT { } INT { };
|
||||
^^^
|
||||
@@ -223,28 +223,28 @@ input.y:11.26-28: warning: unused value: $][5 [-Wother]
|
||||
input.y:12.10-15: warning: empty rule for typed nonterminal, and no action [-Wother]
|
||||
b: INT | %empty;
|
||||
^^^^^^
|
||||
input.y:13.10-62: warning: unset value: $][$ [-Wother]
|
||||
c: INT | INT { $][1; } INT { $<integer>2; } INT { $<integer>4; };
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
]]m4_ifval($2, [[[input.y:13.14-20: warning: unset value: $][$ [-Wmidrule-values]
|
||||
c: INT | INT { $][1; } INT { $<integer>2; } INT { $<integer>4; };
|
||||
^^^^^^^
|
||||
input.y:13.26-41: warning: unset value: $][$ [-Wmidrule-values]
|
||||
c: INT | INT { $][1; } INT { $<integer>2; } INT { $<integer>4; };
|
||||
^^^^^^^^^^^^^^^^
|
||||
]]])[[input.y:13.10-62: warning: unset value: $][$ [-Wother]
|
||||
c: INT | INT { $][1; } INT { $<integer>2; } INT { $<integer>4; };
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
input.y:13.22-24: warning: unused value: $][3 [-Wother]
|
||||
]]])[[input.y:13.22-24: warning: unused value: $][3 [-Wother]
|
||||
c: INT | INT { $][1; } INT { $<integer>2; } INT { $<integer>4; };
|
||||
^^^
|
||||
input.y:13.43-45: warning: unused value: $][5 [-Wother]
|
||||
]]m4_ifval($2, [[[input.y:13.26-41: warning: unset value: $][$ [-Wmidrule-values]
|
||||
c: INT | INT { $][1; } INT { $<integer>2; } INT { $<integer>4; };
|
||||
^^^^^^^^^^^^^^^^
|
||||
]]])[[input.y:13.43-45: warning: unused value: $][5 [-Wother]
|
||||
c: INT | INT { $][1; } INT { $<integer>2; } INT { $<integer>4; };
|
||||
^^^
|
||||
input.y:14.10-49: warning: unset value: $][$ [-Wother]
|
||||
d: INT | INT { } INT { $][1; } INT { $<integer>2; };
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
]]m4_ifval($2, [[[input.y:14.14-16: warning: unset value: $][$ [-Wmidrule-values]
|
||||
d: INT | INT { } INT { $][1; } INT { $<integer>2; };
|
||||
^^^
|
||||
]]])[[input.y:14.10-49: warning: unset value: $][$ [-Wother]
|
||||
d: INT | INT { } INT { $][1; } INT { $<integer>2; };
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
input.y:14.18-20: warning: unused value: $][3 [-Wother]
|
||||
]]])[[input.y:14.18-20: warning: unused value: $][3 [-Wother]
|
||||
d: INT | INT { } INT { $][1; } INT { $<integer>2; };
|
||||
^^^
|
||||
input.y:14.30-32: warning: unused value: $][5 [-Wother]
|
||||
@@ -259,12 +259,12 @@ input.y:15.18-20: warning: unused value: $][3 [-Wother]
|
||||
input.y:15.27-29: warning: unused value: $][5 [-Wother]
|
||||
e: INT | INT { } INT { } INT { $][1; };
|
||||
^^^
|
||||
input.y:17.10-58: warning: unset value: $][$ [-Wother]
|
||||
g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
input.y:17.10-12: warning: unused value: $][1 [-Wother]
|
||||
g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
|
||||
^^^
|
||||
input.y:17.10-58: warning: unset value: $][$ [-Wother]
|
||||
g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
]]m4_ifval($2, [[[input.y:17.14-29: warning: unused value: $][2 [-Wmidrule-values]
|
||||
g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
|
||||
^^^^^^^^^^^^^^^^
|
||||
@@ -277,12 +277,12 @@ input.y:17.10-12: warning: unused value: $][1 [-Wother]
|
||||
]]])[[input.y:17.52-54: warning: unused value: $][5 [-Wother]
|
||||
g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
|
||||
^^^
|
||||
input.y:18.10-72: warning: unset value: $][$ [-Wother]
|
||||
h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
input.y:18.10-12: warning: unused value: $][1 [-Wother]
|
||||
h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
|
||||
^^^
|
||||
input.y:18.10-72: warning: unset value: $][$ [-Wother]
|
||||
h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
input.y:18.31-33: warning: unused value: $][3 [-Wother]
|
||||
h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
|
||||
^^^
|
||||
@@ -295,12 +295,12 @@ input.y:18.31-33: warning: unused value: $][3 [-Wother]
|
||||
]]m4_ifval($2, [[[input.y:20.18-37: warning: unused value: $][3 [-Wmidrule-values]
|
||||
j: INT | INT INT { $<integer>$ = 1; } { $][$ = $][1 + $][2; };
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
]]])[[input.y:21.10-68: warning: unset value: $][$ [-Wother]
|
||||
k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
input.y:21.10-12: warning: unused value: $][1 [-Wother]
|
||||
]]])[[input.y:21.10-12: warning: unused value: $][1 [-Wother]
|
||||
k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
|
||||
^^^
|
||||
input.y:21.10-68: warning: unset value: $][$ [-Wother]
|
||||
k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
input.y:21.14-16: warning: unused value: $][2 [-Wother]
|
||||
k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
|
||||
^^^
|
||||
@@ -458,15 +458,15 @@ exp: bar;
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([-fcaret input.y], [1], [],
|
||||
[[input.y:2.16-18: error: symbol bar is used, but is not defined as a token and has no rules
|
||||
%destructor {} bar
|
||||
^^^
|
||||
[[input.y:1.13-15: warning: symbol foo is used, but is not defined as a token and has no rules [-Wother]
|
||||
%printer {} foo baz
|
||||
^^^
|
||||
input.y:1.17-19: warning: symbol baz is used, but is not defined as a token and has no rules [-Wother]
|
||||
%printer {} foo baz
|
||||
^^^
|
||||
input.y:1.13-15: warning: symbol foo is used, but is not defined as a token and has no rules [-Wother]
|
||||
%printer {} foo baz
|
||||
^^^
|
||||
input.y:2.16-18: error: symbol bar is used, but is not defined as a token and has no rules
|
||||
%destructor {} bar
|
||||
^^^
|
||||
input.y:3.13-15: warning: symbol qux is used, but is not defined as a token and has no rules [-Wother]
|
||||
%type <foo> qux
|
||||
^^^
|
||||
@@ -1417,9 +1417,9 @@ start: TOK;
|
||||
|
||||
AT_BISON_CHECK([[input.yy]], [0], [],
|
||||
[[input.yy:2.9-25: warning: %define variable 'api.location.type' requires '{...}' values [-Wdeprecated]
|
||||
input.yy:3.9-21: warning: %define variable 'api.namespace' requires '{...}' values [-Wdeprecated]
|
||||
input.yy:4.9-18: warning: %define variable 'api.prefix' requires '{...}' values [-Wdeprecated]
|
||||
input.yy:5.9-24: warning: %define variable 'api.token.prefix' requires '{...}' values [-Wdeprecated]
|
||||
input.yy:3.9-21: warning: %define variable 'api.namespace' requires '{...}' values [-Wdeprecated]
|
||||
]])
|
||||
])
|
||||
|
||||
@@ -1448,11 +1448,11 @@ exp: %empty
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[input.y]], [0], [],
|
||||
[[input.y:5.9-15: warning: %define variable 'lr.type' requires keyword values [-Wdeprecated]
|
||||
[[input.y:1.9-16: warning: %define variable 'api.pure' requires keyword values [-Wdeprecated]
|
||||
input.y:2.9-21: warning: %define variable 'api.push-pull' requires keyword values [-Wdeprecated]
|
||||
input.y:3.9-28: warning: %define variable 'lr.default-reduction' requires keyword values [-Wdeprecated]
|
||||
input.y:4.9-33: warning: %define variable 'lr.keep-unreachable-state' requires keyword values [-Wdeprecated]
|
||||
input.y:2.9-21: warning: %define variable 'api.push-pull' requires keyword values [-Wdeprecated]
|
||||
input.y:1.9-16: warning: %define variable 'api.pure' requires keyword values [-Wdeprecated]
|
||||
input.y:5.9-15: warning: %define variable 'lr.type' requires keyword values [-Wdeprecated]
|
||||
]])
|
||||
])
|
||||
|
||||
@@ -1717,26 +1717,26 @@ AT_CHECK([[$PERL -e 'print "start: \"\\\t\\\f\\\0\\\1\" ;";' >> input.y \
|
||||
|| exit 77]])
|
||||
|
||||
AT_BISON_CHECK([input.y], [1], [],
|
||||
[[input.y:2.9-12: error: invalid number after \-escape: 777
|
||||
input.y:2.8-13: warning: empty character literal [-Wother]
|
||||
input.y:2.16-17: error: invalid number after \-escape: 0
|
||||
[[input.y:2.8-13: warning: empty character literal [-Wother]
|
||||
input.y:2.9-12: error: invalid number after \-escape: 777
|
||||
input.y:2.15-18: warning: empty character literal [-Wother]
|
||||
input.y:2.21-25: error: invalid number after \-escape: xfff
|
||||
input.y:2.16-17: error: invalid number after \-escape: 0
|
||||
input.y:2.20-26: warning: empty character literal [-Wother]
|
||||
input.y:2.29-31: error: invalid number after \-escape: x0
|
||||
input.y:2.21-25: error: invalid number after \-escape: xfff
|
||||
input.y:2.28-32: warning: empty character literal [-Wother]
|
||||
input.y:3.9-14: error: invalid number after \-escape: uffff
|
||||
input.y:2.29-31: error: invalid number after \-escape: x0
|
||||
input.y:3.8-15: warning: empty character literal [-Wother]
|
||||
input.y:3.18-23: error: invalid number after \-escape: u0000
|
||||
input.y:3.9-14: error: invalid number after \-escape: uffff
|
||||
input.y:3.17-24: warning: empty character literal [-Wother]
|
||||
input.y:3.27-36: error: invalid number after \-escape: Uffffffff
|
||||
input.y:3.18-23: error: invalid number after \-escape: u0000
|
||||
input.y:3.26-37: warning: empty character literal [-Wother]
|
||||
input.y:3.40-49: error: invalid number after \-escape: U00000000
|
||||
input.y:3.27-36: error: invalid number after \-escape: Uffffffff
|
||||
input.y:3.39-50: warning: empty character literal [-Wother]
|
||||
input.y:4.9-10: error: invalid character after \-escape: ' '
|
||||
input.y:3.40-49: error: invalid number after \-escape: U00000000
|
||||
input.y:4.8-11: warning: empty character literal [-Wother]
|
||||
input.y:4.14-15: error: invalid character after \-escape: A
|
||||
input.y:4.9-10: error: invalid character after \-escape: ' '
|
||||
input.y:4.13-16: warning: empty character literal [-Wother]
|
||||
input.y:4.14-15: error: invalid character after \-escape: A
|
||||
input.y:5.9-16: error: invalid character after \-escape: \t
|
||||
input.y:5.17: error: invalid character after \-escape: \f
|
||||
input.y:5.18: error: invalid character after \-escape: \0
|
||||
@@ -2007,12 +2007,12 @@ AT_BISON_CHECK([[input.y]], [[1]], [[]],
|
||||
input.y:11.15-24: warning: deprecated directive: '%expect_rr', use '%expect-rr' [-Wdeprecated]
|
||||
input.y:12.15-24: warning: deprecated directive: '%expect_rr', use '%expect-rr' [-Wdeprecated]
|
||||
input.y:13.1-14: warning: deprecated directive: '%error_verbose', use '%define parse.error verbose' [-Wdeprecated]
|
||||
input.y:13.16-29: warning: deprecated directive: '%error_verbose', use '%define parse.error verbose' [-Wdeprecated]
|
||||
input.y:13.11-21: error: %define variable 'parse.error' redefined
|
||||
input.y:13-6: previous definition
|
||||
input.y:14.16-29: warning: deprecated directive: '%error_verbose', use '%define parse.error verbose' [-Wdeprecated]
|
||||
input.y:13.16-29: warning: deprecated directive: '%error_verbose', use '%define parse.error verbose' [-Wdeprecated]
|
||||
input.y:14.11-21: error: %define variable 'parse.error' redefined
|
||||
input.y:13.11-21: previous definition
|
||||
input.y:14.16-29: warning: deprecated directive: '%error_verbose', use '%define parse.error verbose' [-Wdeprecated]
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
@@ -88,8 +88,7 @@ exp: useful;
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[input.y]], 0, [],
|
||||
[[input.y: warning: 9 nonterminals useless in grammar [-Wother]
|
||||
input.y:4.8-15: warning: nonterminal useless in grammar: useless1 [-Wother]
|
||||
[[input.y:4.8-15: warning: nonterminal useless in grammar: useless1 [-Wother]
|
||||
input.y:5.8-15: warning: nonterminal useless in grammar: useless2 [-Wother]
|
||||
input.y:6.8-15: warning: nonterminal useless in grammar: useless3 [-Wother]
|
||||
input.y:7.8-15: warning: nonterminal useless in grammar: useless4 [-Wother]
|
||||
@@ -98,6 +97,7 @@ input.y:9.8-15: warning: nonterminal useless in grammar: useless6 [-Wother]
|
||||
input.y:10.8-15: warning: nonterminal useless in grammar: useless7 [-Wother]
|
||||
input.y:11.8-15: warning: nonterminal useless in grammar: useless8 [-Wother]
|
||||
input.y:12.8-15: warning: nonterminal useless in grammar: useless9 [-Wother]
|
||||
input.y: warning: 9 nonterminals useless in grammar [-Wother]
|
||||
]])
|
||||
|
||||
AT_CHECK([[sed -n '/^Grammar/q;/^$/!p' input.output]], 0,
|
||||
@@ -143,62 +143,62 @@ useless9: '9';
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[-fcaret input.y]], 0, [],
|
||||
[[input.y: warning: 9 nonterminals useless in grammar [-Wother]
|
||||
input.y: warning: 9 rules useless in grammar [-Wother]
|
||||
input.y:6.1-8: warning: nonterminal useless in grammar: useless1 [-Wother]
|
||||
[[input.y:6.1-8: warning: nonterminal useless in grammar: useless1 [-Wother]
|
||||
useless1: '1';
|
||||
^^^^^^^^
|
||||
input.y:7.1-8: warning: nonterminal useless in grammar: useless2 [-Wother]
|
||||
useless2: '2';
|
||||
^^^^^^^^
|
||||
input.y:8.1-8: warning: nonterminal useless in grammar: useless3 [-Wother]
|
||||
useless3: '3';
|
||||
^^^^^^^^
|
||||
input.y:9.1-8: warning: nonterminal useless in grammar: useless4 [-Wother]
|
||||
useless4: '4';
|
||||
^^^^^^^^
|
||||
input.y:10.1-8: warning: nonterminal useless in grammar: useless5 [-Wother]
|
||||
useless5: '5';
|
||||
^^^^^^^^
|
||||
input.y:11.1-8: warning: nonterminal useless in grammar: useless6 [-Wother]
|
||||
useless6: '6';
|
||||
^^^^^^^^
|
||||
input.y:12.1-8: warning: nonterminal useless in grammar: useless7 [-Wother]
|
||||
useless7: '7';
|
||||
^^^^^^^^
|
||||
input.y:13.1-8: warning: nonterminal useless in grammar: useless8 [-Wother]
|
||||
useless8: '8';
|
||||
^^^^^^^^
|
||||
input.y:14.1-8: warning: nonterminal useless in grammar: useless9 [-Wother]
|
||||
useless9: '9';
|
||||
^^^^^^^^
|
||||
input.y:6.11-13: warning: rule useless in grammar [-Wother]
|
||||
useless1: '1';
|
||||
^^^
|
||||
input.y:7.1-8: warning: nonterminal useless in grammar: useless2 [-Wother]
|
||||
useless2: '2';
|
||||
^^^^^^^^
|
||||
input.y:7.11-13: warning: rule useless in grammar [-Wother]
|
||||
useless2: '2';
|
||||
^^^
|
||||
input.y:8.1-8: warning: nonterminal useless in grammar: useless3 [-Wother]
|
||||
useless3: '3';
|
||||
^^^^^^^^
|
||||
input.y:8.11-13: warning: rule useless in grammar [-Wother]
|
||||
useless3: '3';
|
||||
^^^
|
||||
input.y:9.1-8: warning: nonterminal useless in grammar: useless4 [-Wother]
|
||||
useless4: '4';
|
||||
^^^^^^^^
|
||||
input.y:9.11-13: warning: rule useless in grammar [-Wother]
|
||||
useless4: '4';
|
||||
^^^
|
||||
input.y:10.1-8: warning: nonterminal useless in grammar: useless5 [-Wother]
|
||||
useless5: '5';
|
||||
^^^^^^^^
|
||||
input.y:10.11-13: warning: rule useless in grammar [-Wother]
|
||||
useless5: '5';
|
||||
^^^
|
||||
input.y:11.1-8: warning: nonterminal useless in grammar: useless6 [-Wother]
|
||||
useless6: '6';
|
||||
^^^^^^^^
|
||||
input.y:11.11-13: warning: rule useless in grammar [-Wother]
|
||||
useless6: '6';
|
||||
^^^
|
||||
input.y:12.1-8: warning: nonterminal useless in grammar: useless7 [-Wother]
|
||||
useless7: '7';
|
||||
^^^^^^^^
|
||||
input.y:12.11-13: warning: rule useless in grammar [-Wother]
|
||||
useless7: '7';
|
||||
^^^
|
||||
input.y:13.1-8: warning: nonterminal useless in grammar: useless8 [-Wother]
|
||||
useless8: '8';
|
||||
^^^^^^^^
|
||||
input.y:13.11-13: warning: rule useless in grammar [-Wother]
|
||||
useless8: '8';
|
||||
^^^
|
||||
input.y:14.1-8: warning: nonterminal useless in grammar: useless9 [-Wother]
|
||||
useless9: '9';
|
||||
^^^^^^^^
|
||||
input.y:14.11-13: warning: rule useless in grammar [-Wother]
|
||||
useless9: '9';
|
||||
^^^
|
||||
input.y: warning: 9 nonterminals useless in grammar [-Wother]
|
||||
input.y: warning: 9 rules useless in grammar [-Wother]
|
||||
]])
|
||||
|
||||
|
||||
@@ -276,23 +276,23 @@ non_productive: non_productive useless_token
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[-fcaret not-reduced.y]], 0, [],
|
||||
[[not-reduced.y: warning: 2 nonterminals useless in grammar [-Wother]
|
||||
not-reduced.y: warning: 3 rules useless in grammar [-Wother]
|
||||
not-reduced.y:14.1-13: warning: nonterminal useless in grammar: not_reachable [-Wother]
|
||||
not_reachable: useful { /* A not reachable action. */ }
|
||||
^^^^^^^^^^^^^
|
||||
not-reduced.y:11.6-19: warning: nonterminal useless in grammar: non_productive [-Wother]
|
||||
[[not-reduced.y:11.6-19: warning: nonterminal useless in grammar: non_productive [-Wother]
|
||||
| non_productive { /* A non productive action. */ }
|
||||
^^^^^^^^^^^^^^
|
||||
not-reduced.y:11.6-57: warning: rule useless in grammar [-Wother]
|
||||
| non_productive { /* A non productive action. */ }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
not-reduced.y:14.1-13: warning: nonterminal useless in grammar: not_reachable [-Wother]
|
||||
not_reachable: useful { /* A not reachable action. */ }
|
||||
^^^^^^^^^^^^^
|
||||
not-reduced.y:14.16-56: warning: rule useless in grammar [-Wother]
|
||||
not_reachable: useful { /* A not reachable action. */ }
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
not-reduced.y:17.17-18.63: warning: rule useless in grammar [-Wother]
|
||||
non_productive: non_productive useless_token
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
not-reduced.y: warning: 2 nonterminals useless in grammar [-Wother]
|
||||
not-reduced.y: warning: 3 rules useless in grammar [-Wother]
|
||||
]])
|
||||
|
||||
AT_CHECK([[sed -n '/^Grammar/q;/^$/!p' not-reduced.output]], 0,
|
||||
@@ -361,13 +361,13 @@ indirection: underivable;
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[input.y]], 0, [],
|
||||
[[input.y: warning: 2 nonterminals useless in grammar [-Wother]
|
||||
input.y: warning: 3 rules useless in grammar [-Wother]
|
||||
input.y:5.15-25: warning: nonterminal useless in grammar: underivable [-Wother]
|
||||
input.y:6.14-24: warning: nonterminal useless in grammar: indirection [-Wother]
|
||||
[[input.y:5.15-25: warning: nonterminal useless in grammar: underivable [-Wother]
|
||||
input.y:5.15-25: warning: rule useless in grammar [-Wother]
|
||||
input.y:6.14-24: warning: nonterminal useless in grammar: indirection [-Wother]
|
||||
input.y:6.14-24: warning: rule useless in grammar [-Wother]
|
||||
input.y:7.14-24: warning: rule useless in grammar [-Wother]
|
||||
input.y: warning: 2 nonterminals useless in grammar [-Wother]
|
||||
input.y: warning: 3 rules useless in grammar [-Wother]
|
||||
]])
|
||||
|
||||
AT_CHECK([[sed -n '/^Grammar/q;/^$/!p' input.output]], 0,
|
||||
@@ -397,9 +397,9 @@ exp: exp;
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[input.y]], 1, [],
|
||||
[[input.y: warning: 2 nonterminals useless in grammar [-Wother]
|
||||
[[input.y:3.1-3: fatal error: start symbol exp does not derive any sentence
|
||||
input.y: warning: 2 nonterminals useless in grammar [-Wother]
|
||||
input.y: warning: 2 rules useless in grammar [-Wother]
|
||||
input.y:3.1-3: fatal error: start symbol exp does not derive any sentence
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
@@ -1147,9 +1147,9 @@ sr_conflict:
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[-Wall -o input.c input.y]], [[0]],,
|
||||
[[input.y:24.5-19: warning: rule useless in parser due to conflicts [-Wother]
|
||||
[[input.y:18.1-5: warning: useless precedence and associativity for TK1 [-Wprecedence]
|
||||
input.y:24.5-19: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input.y:28.5-19: warning: rule useless in parser due to conflicts [-Wother]
|
||||
input.y:18.1-5: warning: useless precedence and associativity for TK1 [-Wprecedence]
|
||||
]])
|
||||
AT_COMPILE([[input]])
|
||||
AT_PARSER_CHECK([[./input]])
|
||||
|
||||
@@ -186,10 +186,10 @@ start: ;
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[input1.y]], [[1]], [[]],
|
||||
[[input1.y: warning: foow fubar [-Wother]
|
||||
[[fooc.y:1.1-10.5: error: foocat fubar
|
||||
foow.y:2.3-5.3: warning: foowat fubar [-Wother]
|
||||
input1.y: warning: foow fubar [-Wother]
|
||||
input1.y: error: fooc fubar
|
||||
fooc.y:1.1-10.5: error: foocat fubar
|
||||
input1.y: fatal error: foof fubar
|
||||
]])
|
||||
|
||||
@@ -276,8 +276,8 @@ start: ;
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[input2.y]], [[1]], [[]],
|
||||
[[input2.y: warning: morning [-Wother]
|
||||
foo.y:1.5-6: fatal error: M4 should exit immediately here
|
||||
[[foo.y:1.5-6: fatal error: M4 should exit immediately here
|
||||
input2.y: warning: morning [-Wother]
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
Reference in New Issue
Block a user