From 2ddeb069eb54466172c38e315d50ce029b4febc3 Mon Sep 17 00:00:00 2001 From: uz Date: Sun, 30 Aug 2009 08:30:55 +0000 Subject: [PATCH] Any field without a name is legal but useless in a union. git-svn-id: svn://svn.cc65.org/cc65/trunk@4086 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/declare.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/cc65/declare.c b/src/cc65/declare.c index 9a9229689..6c722be2f 100644 --- a/src/cc65/declare.c +++ b/src/cc65/declare.c @@ -556,14 +556,9 @@ static SymEntry* ParseUnionDecl (const char* Name) /* Check for fields without a name */ if (Decl.Ident[0] == '\0') { - if (FieldWidth < 0) { - /* A non bit-field without a name is legal but useless */ - Warning ("Declaration does not declare anything"); - goto NextMember; - } else { - /* A bit-field without a name does nothing in a union */ - goto NextMember; - } + /* Any field without a name is legal but useless in a union */ + Warning ("Declaration does not declare anything"); + goto NextMember; } /* Handle sizes */ -- 2.39.5