From 07e349c517a4702c8c2af26064691dcf05c5e580 Mon Sep 17 00:00:00 2001 From: acqn Date: Mon, 15 Jan 2024 23:56:39 +0800 Subject: [PATCH] Skipped anonymous tag names in diagnosis on empty structs/unions. --- src/cc65/symtab.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cc65/symtab.c b/src/cc65/symtab.c index d3544bfc4..8ae49cdf3 100644 --- a/src/cc65/symtab.c +++ b/src/cc65/symtab.c @@ -955,7 +955,13 @@ SymEntry* AddStructSym (const char* Name, unsigned Flags, unsigned Size, SymTabl TagEntry = 0; } else if (Size == 0) { /* Empty struct is not supported now */ - Error ("Empty %s type '%s' is not supported", SCType == SC_STRUCT ? "struct" : "union", Name); + if (!IsAnonName (Name)) { + Error ("Empty %s type '%s' is not supported", + SCType == SC_STRUCT ? "struct" : "union", Name); + } else { + Error ("Empty %s type is not supported", + SCType == SC_STRUCT ? "struct" : "union"); + } TagEntry = 0; } }