From 6436f4c576b65dd8220db7dcd0e7a21f33ac4933 Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 8 Oct 2025 23:03:06 +0200 Subject: initial implementation of run-time array/aggregate initializers --- c.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'c.h') diff --git a/c.h b/c.h index dc6ae32..3b301a3 100644 --- a/c.h +++ b/c.h @@ -43,11 +43,14 @@ struct expr { }; struct init { - uint n; - struct bitset *zero; - uint *offs; - struct { uchar off, siz; } *bitf; - struct expr **ex; + uint nzero; + struct bitset *zero; /* bytes to zero out */ + struct initval { + struct initval *next; + uint off; + uchar bitoff, bitsiz; + struct expr ex; + } *vals, **tail; }; enum storageclass { -- cgit v1.2.3