diff options
author | Raphael Manfredi <Raphael_Manfredi@pobox.com> | 2020-04-09 13:55:22 +0200 |
---|---|---|
committer | Raphael Manfredi <Raphael_Manfredi@pobox.com> | 2020-04-09 13:55:22 +0200 |
commit | 50c6eebba8951436381819ea6f22b94171a0e7f5 (patch) | |
tree | 98ac6e6f6ee5e6200e370c2ce880080e8d920054 /mcon/U | |
parent | 35f0ffa60c3ca18b865718fd83f7b4c5e90f205e (diff) |
Use a more compact version of STATIC_ASSERT().
Diffstat (limited to 'mcon/U')
-rw-r--r-- | mcon/U/Assert.U | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mcon/U/Assert.U b/mcon/U/Assert.U index 76de54d..1a38e49 100644 --- a/mcon/U/Assert.U +++ b/mcon/U/Assert.U @@ -20,7 +20,6 @@ ?X: There is no need to link the file to spot the assertion failure. ?X: $cat >static_assert.h <<'EOC' -#define STATIC_ASSERT(expr) \ - do { switch (0) { case ((expr) ? 1 : 0): case 0: break; } } while(0) +#define STATIC_ASSERT(expr) ((void) sizeof(char[1 - 2*!(expr)])) EOC |