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.
This commit is contained in:
Akim Demaille
2014-12-31 14:15:06 +01:00
parent a3c3c6f242
commit 8d4dc896cb
5 changed files with 70 additions and 23 deletions

1
THANKS
View File

@@ -112,6 +112,7 @@ Quoc Peyrot chojin@lrde.epita.fr
R Blake blakers@mac.com
Raja R Harinath harinath@cs.umn.edu
Ralf Wildenhues Ralf.Wildenhues@gmx.de
Rich Wilson richaw@gmail.com
Richard Stallman rms@gnu.org
Rici Lake ricilake@gmail.com
Rob Conde rob.conde@ai-solutions.com