+2020-11-20 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * unittests/gmp-utils-selftests.c (gdb_mpz_read_all_from_small):
+ Pass 2.0 to pow.
+ (gdb_mpz_write_all_from_small): Likewise.
+
2020-11-20 Simon Marchi <simon.marchi@polymtl.ca>
* dwarf2/read.c (finish_fixed_point_type): Use std::abs instead
to check the complete range. */
int buf_len = 1;
- LONGEST l_min = -pow (2, buf_len * 8 - 1);
- LONGEST l_max = pow (2, buf_len * 8 - 1) - 1;
+ LONGEST l_min = -pow (2.0, buf_len * 8 - 1);
+ LONGEST l_max = pow (2.0, buf_len * 8 - 1) - 1;
for (LONGEST l = l_min; l <= l_max; l++)
{
/* Do the same as above, but with an unsigned type. */
ULONGEST ul_min = 0;
- ULONGEST ul_max = pow (2, buf_len * 8) - 1;
+ ULONGEST ul_max = pow (2.0, buf_len * 8) - 1;
for (ULONGEST ul = ul_min; ul <= ul_max; ul++)
{
gdb_mpz_write_all_from_small ()
{
int buf_len = 1;
- LONGEST l_min = -pow (2, buf_len * 8 - 1);
- LONGEST l_max = pow (2, buf_len * 8 - 1) - 1;
+ LONGEST l_min = -pow (2.0, buf_len * 8 - 1);
+ LONGEST l_max = pow (2.0, buf_len * 8 - 1) - 1;
for (LONGEST l = l_min; l <= l_max; l++)
{
/* Do the same as above, but with an unsigned type. */
ULONGEST ul_min = 0;
- ULONGEST ul_max = pow (2, buf_len * 8) - 1;
+ ULONGEST ul_max = pow (2.0, buf_len * 8) - 1;
for (ULONGEST ul = ul_min; ul <= ul_max; ul++)
{