/* Build-time checks are preferrable over runtime ones. Use this construct
in preference where possible. */
+#ifndef static_assert
#define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); }))
+#endif
static const char *program_name = NULL;
static int debug = 0;
#define MAPPED_INT(SIZE, LSB, MAP, PRINT_HEX) \
{ \
typedef char ATTRIBUTE_UNUSED \
- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
+ static_assert_3[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
static const struct mips_mapped_int_operand op = { \
{ OP_MAPPED_INT, SIZE, LSB }, MAP, PRINT_HEX \
}; \
#define MAPPED_REG(SIZE, LSB, BANK, MAP) \
{ \
typedef char ATTRIBUTE_UNUSED \
- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
+ static_assert_4[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
static const struct mips_reg_operand op = { \
{ OP_REG, SIZE, LSB }, OP_REG_##BANK, MAP \
}; \
#define OPTIONAL_MAPPED_REG(SIZE, LSB, BANK, MAP) \
{ \
typedef char ATTRIBUTE_UNUSED \
- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
+ static_assert_5[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
static const struct mips_reg_operand op = { \
{ OP_OPTIONAL_REG, SIZE, LSB }, OP_REG_##BANK, MAP \
}; \
/* Build-time checks are preferrable over runtime ones. Use this construct
in preference where possible. */
+#ifndef static_assert
#define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); }))
+#endif
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))