}
case STCHAR: /* character constant */
{
- register arith val = 0, size = 0;
+ register arith val = 0;
+ int size = 0;
LoadChar(ch);
if (ch == '\'')
size++;
LoadChar(ch);
}
- if (size > int_size)
+ if (size > (int)int_size)
lexerror("character constant too long");
ptok->tk_ival = val;
ptok->tk_fund = INT;
int from_fund = fundamental(from_type);
int to_fund = fundamental(to_type);
- if (to_size < word_size) to_size = word_size;
- if (from_size == to_size && from_fund == to_fund)
+ if ((int)to_size < (int)word_size) to_size = word_size;
+ if ((int)from_size == (int)to_size && from_fund == to_fund)
return;
switch (from_fund) {
case T_SIGNED:
#ifndef NOFLOAT
case T_FLOATING:
#endif NOOFLOAT
- if (from_size < word_size) {
+ if ((int)from_size < (int)word_size) {
C_loc(from_size);
C_loc(word_size);
C_cii();
}
break;
case T_UNSIGNED:
- if (from_size < word_size) from_size = word_size;
+ if ((int)from_size < (int)word_size) from_size = word_size;
C_loc(from_size);
C_loc(to_size);
switch (to_fund) {
default:
crash("(conversion) illegal type conversion");
}
- if (to_type->tp_size < word_size
+ if ((int)(to_type->tp_size) < (int)word_size
#ifndef NOFLOAT
&& to_fund != T_FLOATING
#endif NOFLOAT
}
mach_long_size = i;
mach_long_sign = 1L << (mach_long_size * 8 - 1);
- if (long_size < mach_long_size)
+ if ((int)long_size < mach_long_size)
fatal("sizeof (long) insufficient on this machine");
- max_int = full_mask[(int)int_size] & ~(1L << (int_size * 8 - 1));
+ max_int = full_mask[(int)int_size] & ~(1L << ((int)int_size * 8 - 1));
max_unsigned = full_mask[(int)int_size];
}
#include "specials.h"
#define CRASH() crash("EVAL: CRASH at line %u", __LINE__)
-#define toword(n) ((n) < word_size ? word_size : (n))
char *symbol2str();
char *long2str();
if (gencode) {
arith size = tp->tp_size;
- if (size < word_size)
+ if ((int)size < (int)word_size)
size = word_size;
switch (oper) {
case '&':
register arith size;
register uns = type->tp_unsigned;
- if ((size = type->tp_size) < word_size)
+ if ((int)(size = type->tp_size) < (int)word_size)
size = word_size;
switch (type->tp_fund) {
case CHAR:
pointer arithmetic type which is equal to either
int_type or long_type, depending on the pointer_size
*/
- if (pointer_size == word_size)
+ if ((int)pointer_size == (int)word_size)
pa_type = word_type;
else
- if (pointer_size == short_size)
+ if ((int)pointer_size == (int)short_size)
pa_type = short_type;
else
- if (pointer_size == int_size)
+ if ((int)pointer_size == (int)int_size)
pa_type = int_type;
else
- if (pointer_size == long_size)
+ if ((int)pointer_size == (int)long_size)
pa_type = long_type;
else
fatal("pointer size incompatible with any integral size");
- if (int_size != word_size)
+ if ((int)int_size != (int)word_size)
fatal("int_size and word_size are not equal");
- if (short_size > int_size || int_size > long_size)
+ if ((int)short_size > (int)int_size || (int)int_size > (int)long_size)
fatal("sizes of short/int/long decreasing");
/* Build a type for function returning int, RM 13 */