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 <jan.kratochvil@redhat.com>
+2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * system.h (eu_static_assert): New macro.
+
2012-01-21 Ulrich Drepper <drepper@gmail.com>
* Makefile.am (libeu_a_SOURCES): Add color.c.
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 */
+2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * cfi.c: New include system.h.
+ (execute_cfi) (enough_registers): Clear new memory after realloc.
+
2012-10-08 Jan Kratochvil <jan.kratochvil@redhat.com>
* fde.c (__libdw_find_fde): Change <fde != NULL> to likely. Return
#include "cfi.h"
#include "memory-access.h"
#include "encoded-value.h"
+#include "system.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
}
else
{
+ eu_static_assert (reg_unspecified == 0);
+ memset (bigger->regs + bigger->nregs, 0,
+ (reg + 1 - bigger->nregs) * sizeof bigger->regs[0]);
bigger->nregs = reg + 1;
fs = bigger;
}