* intnum.c (yasm_intnum_get_sized): Honor negative warn setting (signed).

* intnum.h (yasm_intnum_check_size): Remove reference to nonexistent param
"is_signed" (this was replaced a long time ago with the rangetype param).

svn path=/trunk/yasm/; revision=1368
0.5.0rc2
Peter Johnson 19 years ago
parent 1d4aab4fc5
commit d8c7ca6d3b
  1. 6
      libyasm/intnum.c
  2. 1
      libyasm/intnum.h

@ -559,7 +559,11 @@ yasm_intnum_get_sized(const yasm_intnum *intn, unsigned char *ptr,
yasm_internal_error(N_("destination too large"));
/* General size warnings */
if (warn && !yasm_intnum_check_size(intn, valsize, rshift, 2))
if (warn<0 && !yasm_intnum_check_size(intn, valsize, rshift, 1))
yasm__warning(YASM_WARN_GENERAL, line,
N_("value does not fit in signed %d bit field"),
valsize);
if (warn>0 && !yasm_intnum_check_size(intn, valsize, rshift, 2))
yasm__warning(YASM_WARN_GENERAL, line,
N_("value does not fit in %d bit field"), valsize);

@ -185,7 +185,6 @@ void yasm_intnum_get_sized(const yasm_intnum *intn, unsigned char *ptr,
int bigendian, int warn, unsigned long line);
/** Check to see if intnum will fit without overflow into size bits.
* If is_signed is 1, intnum is treated as a signed number.
* \param intn intnum
* \param size number of bits of output space
* \param rshift right shift

Loading…
Cancel
Save