There is an implicit assumption (see TypePass::enumvalueDeclaration()) that only the first enum element has a non-null "_last" attribute, but this was broken by the latest enum-related grammar changes as the second enum element also had "_last" set, coming from the new "enumlist_tail" production. This resulted in wrong values being used for the second (only) element. Fix this by explicitly resetting "_last" of enumlist_tail to NULL when building the semantic value associated with it. |
||
|---|---|---|
| .. | ||
| cparse.h | ||
| cscanner.c | ||
| parser.y | ||
| templ.c | ||
| util.c | ||