From e1911f9aff91a2264b6d05c3fda8505bed07739a Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 1 Nov 2019 22:12:41 -0700 Subject: GLK: Fix structures using unions --- engines/glk/archetype/statement.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'engines/glk/archetype/statement.h') diff --git a/engines/glk/archetype/statement.h b/engines/glk/archetype/statement.h index 0be8c1b9a0..62c2095797 100644 --- a/engines/glk/archetype/statement.h +++ b/engines/glk/archetype/statement.h @@ -34,7 +34,7 @@ enum StatementKind { ST_DESTROY, ST_WRITE, ST_WRITES, ST_STOP, CONT_SEQ, END_SEQ }; -union StatementType; +struct StatementType; typedef StatementType *StatementPtr; struct StmtCompound { @@ -74,8 +74,7 @@ struct StmtWrite { ListType print_list; }; -union StatementType { - StatementKind _kind; +union StatementTypeData { StmtCompound _compound; StmtExpr _expr; StmtIf _if; @@ -86,6 +85,11 @@ union StatementType { StmtWrite _write; }; +struct StatementType { + StatementKind _kind; + StatementTypeData _data; +}; + struct CasePairType { ExprTree value; StatementPtr action; -- cgit v1.2.3