[PATCH 2/3] Cast the log10 argument to double to disambiguate it

Tom Tromey tom@tromey.com
Thu Dec 19 18:17:00 GMT 2019


>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Wed, 18 Dec 2019 18:01:02 -0600
>> From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
>> Cc: Christian Biesinger <cbiesinger@google.com>
>> 
>> On Solaris 11 with gcc 5.5.0 (gcc211 on the compile farm), math.h has a
>> using std::log10; directive. This is unfortunate because std::log10 has
>> overloads for float/double/long double. To disambiguate this call,
>> cast the argument to double to fix the build.

Eli> We may wish to have a comment in the code referring to the original
Eli> problem, including perhaps the OS and the compiler versions?
Eli> Otherwise the need for this cast is not immediately obvious, IMO.

Agreed; this is ok with that change.

Tom



More information about the Gdb-patches mailing list