]> git.saurik.com Git - bison.git/commit
yacc.c: fix broken union when api.value.type=union and %defines are used
authorAkim Demaille <akim@lrde.epita.fr>
Wed, 31 Dec 2014 13:15:06 +0000 (14:15 +0100)
committerAkim Demaille <akim@lrde.epita.fr>
Wed, 31 Dec 2014 13:39:05 +0000 (14:39 +0100)
commit8d4dc896cb3aac3afaf82130a137c9d1afe37e48
tree7d6c1170b1da697583581465b2719c07c706bf21
parenta3c3c6f2428177ff071e3a70fc6b23e72962c177
yacc.c: fix broken union when api.value.type=union and %defines are used

Reported by Rich Wilson.

* data/c.m4 (b4_symbol_type_register): Append to b4_union_members,
not b4_user_union_members.
The latter invokes the former, but it is the former which is reinitialized
to empty by b4_value_type_setup_union.
* tests/types.at: Check it.

This reveals another bug, this time in the case of glr.c parsers.

* data/glr.c: Generate the header file before the implementation file,
to be sure that the setup is run before what depends on it.
NEWS
THANKS
data/c.m4
data/glr.c
tests/types.at