changed some variables from arith to int
This commit is contained in:
parent
cf4c99a093
commit
f6c7b7bbcd
1 changed files with 8 additions and 4 deletions
|
@ -366,10 +366,14 @@ add_field(szp, fd, fdtpp, idf, stp)
|
||||||
Note that the fields are packed into machine words (according
|
Note that the fields are packed into machine words (according
|
||||||
to the RM.)
|
to the RM.)
|
||||||
*/
|
*/
|
||||||
long bits_in_type = word_size * 8;
|
#ifdef word_size
|
||||||
|
#define bits_in_type ((int)(8*word_size))
|
||||||
|
#else
|
||||||
|
int bits_in_type = word_size * 8;
|
||||||
|
#endif
|
||||||
static int field_offset = (arith)0;
|
static int field_offset = (arith)0;
|
||||||
static struct type *current_struct = 0;
|
static struct type *current_struct = 0;
|
||||||
static long bits_declared; /* nr of bits used in *field_offset */
|
static int bits_declared; /* nr of bits used in *field_offset */
|
||||||
|
|
||||||
if (current_struct != stp) {
|
if (current_struct != stp) {
|
||||||
/* This struct differs from the last one
|
/* This struct differs from the last one
|
||||||
|
@ -394,7 +398,7 @@ add_field(szp, fd, fdtpp, idf, stp)
|
||||||
case ENUM:
|
case ENUM:
|
||||||
case LONG:
|
case LONG:
|
||||||
/* right type; size OK? */
|
/* right type; size OK? */
|
||||||
if ((*fdtpp)->tp_size > word_size) {
|
if ((int) (*fdtpp)->tp_size > (int) word_size) {
|
||||||
error("bit field type %s does not fit in a word",
|
error("bit field type %s does not fit in a word",
|
||||||
symbol2str((*fdtpp)->tp_fund));
|
symbol2str((*fdtpp)->tp_fund));
|
||||||
*fdtpp = error_type;
|
*fdtpp = error_type;
|
||||||
|
@ -417,7 +421,7 @@ add_field(szp, fd, fdtpp, idf, stp)
|
||||||
field_offset = align(*szp, int_align);
|
field_offset = align(*szp, int_align);
|
||||||
*szp = field_offset + int_size;
|
*szp = field_offset + int_size;
|
||||||
stp->tp_align = lcm(stp->tp_align, int_align);
|
stp->tp_align = lcm(stp->tp_align, int_align);
|
||||||
bits_declared = (arith)0;
|
bits_declared = 0;
|
||||||
field_busy = 1;
|
field_busy = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue