From d6aa446b541cbfa909187b6eb0243e95712c37e4 Mon Sep 17 00:00:00 2001 From: acqn Date: Mon, 3 Aug 2020 01:24:38 +0800 Subject: [PATCH] Error info for loading expressions of incomplete enum types. No more "Illegal type 0016". --- src/cc65/datatype.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cc65/datatype.c b/src/cc65/datatype.c index aaee7260f..bcaf3ab64 100644 --- a/src/cc65/datatype.c +++ b/src/cc65/datatype.c @@ -974,6 +974,11 @@ unsigned TypeOf (const Type* T) /* Address of ... */ return CF_INT | CF_UNSIGNED; + case T_ENUM: + /* Incomplete enum type */ + Error ("Incomplete enum type"); + return CF_INT; + default: Error ("Illegal type %04lX", T->C); return CF_INT;