Add @(init) attribute for procedures, allowing for procedures to be called at startup

These procedures will be called after global variables have been initialized as normal
This commit is contained in:
gingerBill committed 2021-10-03 11:53:32 +01:00
1 parent b3a66b3950
commit 2bdae52fed
7 files changed
+145 -13

No files matched your search

+3
View File
@@ -722,6 +722,9 @@ void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) {
if (ac.test) {
e->flags |= EntityFlag_Test;
}
if (ac.init) {
e->flags |= EntityFlag_Init;
}
if (ac.set_cold) {
e->flags |= EntityFlag_Cold;
}