aboutsummaryrefslogtreecommitdiff
path: root/stdlib/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/util.h')
-rw-r--r--stdlib/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/stdlib/util.h b/stdlib/util.h
index fb708476..310ba905 100644
--- a/stdlib/util.h
+++ b/stdlib/util.h
@@ -17,6 +17,8 @@
#define check_initialized(var, name) *({ if (!var ## $initialized) fail("The variable " name " is being accessed before it has been initialized!"); \
&var; })
+#define IF_DECLARE(decl, expr, block) if (({ decl; expr ? ({ block; 1; }) : 0; })) {}
+
#ifndef auto
#define auto __auto_type
#endif