mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 08:43:03 +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:
@@ -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