[PATCH 2/2] gdb: fix unittests/gmp-utils-selftests.c build on solaris
Tom Tromey
tom@tromey.com
Fri Nov 20 15:31:14 GMT 2020
>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
Simon> The "pow" function overloads only exist for float-like types, and the
Simon> compiler doesn't know which one we want. Change "2" for "2.0", which
Simon> makes the compiler choose one alternative (the double one, I believe).
Simon> gdb/ChangeLog:
Simon> * unittests/gmp-utils-selftests.c (gdb_mpz_read_all_from_small):
Simon> Pass 2.0 to pow.
Simon> (gdb_mpz_write_all_from_small): Likewise.
This seems fine, though I wonder if it should use std::pow.
I guess I'm a little surprised that ordinary 'pow' has overloads.
Tom
More information about the Gdb-patches
mailing list