]> git.saurik.com Git - bison.git/commit
glr: do not use locations when they are not requested
authorAkim Demaille <akim@lrde.epita.fr>
Sat, 31 Mar 2012 07:45:59 +0000 (09:45 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Sat, 31 Mar 2012 09:23:44 +0000 (11:23 +0200)
commit769a8ef9bcb5e14d0be9d0869f5dca20ab093930
tree0ee96e16419089cd072b34ed09f53abaaa7cfe2a
parentef51bfa744db744dc4b2eff1ba9d6334c807f8e6
glr: do not use locations when they are not requested

When the test suite runs with -O2 and warnings enabled, G++
complains of locations being used, but not initialized.
The simplest is to not use locations.

* data/glr.c (b4_locuser_formals, b4_locuser_args): New.
Use them when locations should not be used.
Use b4_locations_if where appropriate.
(yyuserAction): Modify the order to the arguments to make
it more alike the other routines, and to make use of
b4_locuser_args simpler.
data/glr.c