if (flags & ATOMIC_TYPE_FLAG_INTEGER) {
assert(! (flags & ATOMIC_TYPE_FLAG_FLOAT));
- snprintf(name, sizeof(name), "i%s%d", is_signed?"":"u", bit_size);
+ snprintf(name, sizeof(name), "i%s%u", is_signed ? "" : "u", bit_size);
sort = irms_int_number;
arithmetic = irma_twos_complement;
modulo_shift = bit_size < machine_size ? machine_size : bit_size;
} else {
assert(flags & ATOMIC_TYPE_FLAG_FLOAT);
- snprintf(name, sizeof(name), "f%d", bit_size);
+ snprintf(name, sizeof(name), "f%u", bit_size);
sort = irms_float_number;
arithmetic = irma_ieee754;
modulo_shift = 0;
unsigned modulo_shift
= bit_size < machine_size ? machine_size : bit_size;
- snprintf(name, sizeof(name), "p%d", machine_size);
+ snprintf(name, sizeof(name), "p%u", machine_size);
ir_mode *ptr_mode = new_ir_mode(name, sort, bit_size, is_signed, arithmetic,
modulo_shift);
if (is_type_compound(type)) {
fprintf(stderr, ".%s", entry->compound_entry->symbol->string);
} else if (is_type_array(type)) {
- fprintf(stderr, "[%zd]", entry->index);
+ fprintf(stderr, "[%zu]", entry->index);
} else {
fprintf(stderr, "-INVALID-");
}
char buf[64];
ir_node *value = get_value_from_lvalue(expr, addr);
- snprintf(buf, sizeof(buf), "%d", pos);
+ snprintf(buf, sizeof(buf), "%u", pos);
ir_asm_constraint constraint;
constraint.pos = pos;
#define KeyType const char *
#define ConstKeyType const char *
#define GetKey(value) (value)->string
-#define InitData(this,value,key) { (value) = (ValueType) obstack_alloc(&symbol_obstack, sizeof(symbol_t)); init_symbol_table_entry((value), key); }
+#define InitData(this,value,key) ((void)((value) = (ValueType)obstack_alloc(&symbol_obstack, sizeof(symbol_t)), init_symbol_table_entry((value), key)))
#define Hash(this, key) hash_string(key)
#define KeysEqual(this,key1,key2) (strcmp(key1, key2) == 0)
#define SetRangeEmpty(ptr,size) memset(ptr, 0, (size) * sizeof(symbol_table_hash_entry_t))