diff options
author | Michael Forney <mforney@mforney.org> | 2024-03-23 14:15:00 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2024-03-23 14:15:00 -0700 |
commit | 2e3ecc7000138622a528eef7681bfdd8ca0bc3c5 (patch) | |
tree | 86331119dbf3a15df98ea54701cedd6a8be63026 /cc.h | |
parent | 52d9d1e21c38d33a0dcab8021751743ac180766b (diff) |
expr: Keep track of storage duration of compound literals
Diffstat (limited to 'cc.h')
-rw-r--r-- | cc.h | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -247,6 +247,12 @@ enum linkage { LINKEXTERN, }; +enum storageduration { + SDSTATIC, + SDTHREAD, + SDAUTO, +}; + enum builtinkind { BUILTINALLOCA, BUILTINCONSTANTP, @@ -360,6 +366,7 @@ struct expr { struct bitfield bits; } bitfield; struct { + enum storageduration storage; struct init *init; } compound; struct { @@ -502,12 +509,7 @@ struct expr *exprpromote(struct expr *); /* eval */ -enum evalkind { - EVALARITH, /* arithmetic constant expression */ - EVALINIT, /* initializer constant expression */ -}; - -struct expr *eval(struct expr *, enum evalkind); +struct expr *eval(struct expr *); /* init */ |