summary refs log tree commit diff
path: root/lisc/lisc.h
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-02-26 13:33:27 -0500
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-02-26 13:33:27 -0500
commit5bff7146fd6fe9b1c0611ad3365455b37c54cdf3 (patch)
tree124966b2925da59899eaa9536f1a0bccb69d53e8 /lisc/lisc.h
parent6275cd6e0676eba4c80bc3293b4b8c28189eaa86 (diff)
downloadroux-5bff7146fd6fe9b1c0611ad3365455b37c54cdf3.tar.gz
add cheapo static assert
Diffstat (limited to 'lisc/lisc.h')
-rw-r--r--lisc/lisc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisc/lisc.h b/lisc/lisc.h
index 0e69967..1c3f3f5 100644
--- a/lisc/lisc.h
+++ b/lisc/lisc.h
@@ -5,6 +5,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#define MAKESURE(what, x) typedef char make_sure_##what[(x)?1:-1]
+
 typedef unsigned int uint;
 typedef unsigned short ushort;
 typedef unsigned long ulong;
@@ -86,6 +88,8 @@ enum {
 	NBit    = CHAR_BIT * sizeof(ulong),
 };
 
+MAKESURE(NBit_is_enough, NBit >= (int)Tmp0);
+
 struct BSet {
 	uint nt;
 	ulong *t;