diff options
| author | Marko Kreen | 2012-04-05 14:01:27 +0000 |
|---|---|---|
| committer | Marko Kreen | 2012-04-05 14:16:22 +0000 |
| commit | af67361bf29d165214c3f0f40571137a9b525c6d (patch) | |
| tree | d51158b06bea960c82e62d45775838b32833b16a /test | |
| parent | 6af816b5c76eeae14268accf546df7d4e9d88060 (diff) | |
base: static_assert(expr, msg)
Provide static_assert() macro. On newer compilers
it tries to use built-in implementation, on older
ones compat one.
The detection does not need to be too strict as there
is always fallback implementation available.
Include <assert.h>, as that is where C1x will provide it.
Diffstat (limited to 'test')
| -rw-r--r-- | test/compile.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/compile.c b/test/compile.c index c715981..a306513 100644 --- a/test/compile.c +++ b/test/compile.c @@ -39,6 +39,8 @@ int main(void) struct md5_ctx md5; char buf[128]; + static_assert(sizeof(int) >= 4, "unsupported int size"); + aatree_init(&aatree, NULL, NULL); cbtree = cbtree_create(NULL, NULL, NULL, USUAL_ALLOC); cbtree_destroy(cbtree); |
