]> git.saurik.com Git - bison.git/commit
diagnostics: fix the order of multiple declarations reports
authorAkim Demaille <akim@lrde.epita.fr>
Mon, 9 Dec 2013 14:26:52 +0000 (15:26 +0100)
committerAkim Demaille <akim@lrde.epita.fr>
Mon, 9 Dec 2013 15:53:03 +0000 (16:53 +0100)
commit461f1516f8d301f5be532e496f6def0d15e502ed
treec8fe57f0d23456b3691334c244a3003aed6bda0d
parent26eb4f0bdcd78ea56c05c49363b9fbe6072c425c
diagnostics: fix the order of multiple declarations reports

On

  %token FOO "foo"
  %printer {} "foo"
  %printer {} FOO

we report

  /tmp/foo.yy:2.10-11: error: %printer redeclaration for FOO
   %printer {} "foo"
            ^^
  /tmp/foo.yy:3.10-11:     previous declaration
   %printer {} FOO
            ^^

* src/symtab.c (locations_sort): New.
Use it.
* tests/input.at (Invalid Aliases): Stress the order of diagnostics.
NEWS
src/symtab.c
tests/input.at