Remove deprecated --structs-packed.

This commit is contained in:
Wilson Snyder
2026-09-13 14:54:34 -04:00
parent e172e94b30
commit 547eb6a836
12 changed files with 9 additions and 97 deletions
+1 -5
View File
@@ -3827,7 +3827,6 @@ class WidthVisitor final : public VNVisitor {
if (unionp->isTagged()) { nodep->v3warn(E_UNSUPPORTED, "Unsupported: tagged union"); }
}
// UINFOTREE(9, nodep, "", "class-in");
if (!nodep->packed() && v3Global.opt.structsPacked()) nodep->packed(true);
userIterateChildren(nodep, nullptr); // First size all members
nodep->dtypep(nodep);
nodep->isFourstate(false);
@@ -3835,10 +3834,7 @@ class WidthVisitor final : public VNVisitor {
for (AstMemberDType* itemp = nodep->membersp(); itemp;
itemp = VN_AS(itemp->nextp(), MemberDType)) {
AstNodeDType* const dtp = itemp->subDTypep()->skipRefp();
if (nodep->packed()
&& !dtp->isIntegralOrPacked()
// Historically lax:
&& !v3Global.opt.structsPacked())
if (nodep->packed() && !dtp->isIntegralOrPacked())
itemp->v3error("Unpacked data type "
<< dtp->prettyDTypeNameQ()
<< " in packed struct/union (IEEE 1800-2023 7.2.1)");