Merge pull request #5507 from Paul-Andre/fix-issue-5474

Fix issue 5474
This commit is contained in:
gingerBill
2025-07-28 11:42:09 +01:00
committed by GitHub
+2 -6
View File
@@ -10335,13 +10335,10 @@ gb_internal ExprKind check_compound_literal(CheckerContext *c, Operand *o, Ast *
is_constant = false;
}
if (cl->elems[0]->kind == Ast_FieldValue) {
error(cl->elems[0], "'field = value' in a bit_set a literal is not allowed");
is_constant = false;
} else {
for (Ast *elem : cl->elems) {
if (elem->kind == Ast_FieldValue) {
error(elem, "'field = value' in a bit_set a literal is not allowed");
error(elem, "'field = value' in a bit_set literal is not allowed");
is_constant = false;
continue;
}
@@ -10382,7 +10379,6 @@ gb_internal ExprKind check_compound_literal(CheckerContext *c, Operand *o, Ast *
}
}
}
}
break;
}
case Type_BitField: {