if (tv == NULL) {
panic("Couldn't get numeric value for bitfield initializer");
}
+ tv = tarval_convert_to(tv, get_type_mode(type));
/* normalize offset */
vals += offset_bits >> 3;
* In the worst case, every initializer allocates one byte.
* Moreover, initializer might be big, do not allocate on stack.
*/
- vals = xcalloc(size, sizeof(vals[0]));
+ vals = XMALLOCNZ(normal_or_bitfield, size);
#ifndef NDEBUG
glob_vals = vals;
* In the worst case, every initializer allocates one byte.
* Moreover, initializer might be big, do not allocate on stack.
*/
- vals = xcalloc(last_ofs, sizeof(vals[0]));
+ vals = XMALLOCNZ(normal_or_bitfield, last_ofs);
/* collect the values and store them at the offsets */
for (i = 0; i < n; ++i) {