diff options
| author | 2026-03-19 11:17:42 +0100 | |
|---|---|---|
| committer | 2026-03-19 11:17:42 +0100 | |
| commit | 2c12f4d4f4bb75f7c54abd3273e3f2466fe4e849 (patch) | |
| tree | 9f05dd699f5652cff4b01c8f8cf8df88dc2e2a07 | |
| parent | 1b782f049fa96d7ebccf93ad2b05fc30b938c870 (diff) | |
c: remove unused initialization of decl.align
The intent is for _Alignas declarations but those aren't implemented
yet. And initializing that field in declarator() can mess with .sym.
| -rw-r--r-- | src/c.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2725,7 +2725,7 @@ decltypes(CComp *cm, DeclList *list, internstr *name, Span *span, Span *namespan static Decl declarator(DeclState *st, CComp *cm, Span span0) { - Decl decl = { st->base, st->scls, .qual = st->qual, .align = st->align, .span = span0 }; + Decl decl = { st->base, st->scls, .qual = st->qual, .span = span0 }; DeclList list = { &list, &list }, *l; Span namespan ={0}; static bool inidecltmp; @@ -2878,10 +2878,10 @@ pdecl(DeclState *st, CComp *cm) { if (st->scls == SCTYPEDEF) properdecl = 0; if (first && st->tagdecl && match(cm, &tk, ';')) { - decl = (Decl) { st->base, st->scls, st->qual, .align = st->align, .span = decl.span }; + decl = (Decl) { st->base, st->scls, st->qual, .span = decl.span }; return decl; } else if (st->kind == DFIELD && match(cm, &tk, ':')) { - decl = (Decl) { st->base, st->scls, st->qual, .align = st->align, .span = decl.span }; + decl = (Decl) { st->base, st->scls, st->qual, .span = decl.span }; st->bitf = 1; return decl; } |