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:39:05 +01:00
parent a3c3c6f242
commit 8d4dc896cb
5 changed files with 70 additions and 23 deletions
+1
View File
@@ -112,6 +112,7 @@ Quoc Peyrot [email protected]
R Blake [email protected]
Raja R Harinath [email protected]
Ralf Wildenhues [email protected]
Rich Wilson [email protected]
Richard Stallman [email protected]
Rici Lake [email protected]
Rob Conde [email protected]