diff options
| author | Jan Kratochvil <[email protected]> | 2012-10-08 23:51:31 +0200 |
|---|---|---|
| committer | Jan Kratochvil <[email protected]> | 2012-10-08 23:51:31 +0200 |
| commit | 1d67c0c87a56349f7a0169e6bef6385696d86af2 (patch) | |
| tree | bd9c89e490cb7f7d06965e185aab913e3efb0ea9 /lib | |
| parent | 07f3507442cb3f913000844025ca139925afe110 (diff) | |
lib/
system.h (eu_static_assert): New macro.
libdw/
cfi.c: New include system.h.
(execute_cfi) (enough_registers): Clear new memory after realloc.
Signed-off-by: Jan Kratochvil <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/ChangeLog | 4 | ||||
| -rw-r--r-- | lib/system.h | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index 47e831ea..46eeeca0 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2012-10-08 Jan Kratochvil <[email protected]> + + * system.h (eu_static_assert): New macro. + 2012-01-21 Ulrich Drepper <[email protected]> * Makefile.am (libeu_a_SOURCES): Add color.c. diff --git a/lib/system.h b/lib/system.h index 9ac01f89..d9adee9c 100644 --- a/lib/system.h +++ b/lib/system.h @@ -121,4 +121,11 @@ extern char *color_weak; extern const char color_off[]; +/* A static assertion. This will cause a compile-time error if EXPR, + which must be a compile-time constant, is false. */ + +#define eu_static_assert(expr) \ + extern int never_defined_just_used_for_checking[(expr) ? 1 : -1] \ + __attribute__ ((unused)) + #endif /* system.h */ |
