__fp16 is ambiguous error in C++

Jonathan Wakely jwakely@redhat.com
Fri Jun 25 21:57:28 GMT 2021


> foo.c:6:23: error: call of overloaded 'exp(__fp16&)' is ambiguous

__fp16 isn't ambiguous, calling std::exp with an argument of that type
is ambiguous, because the standard library doesn't provide an overload
for that type.

It could be added (probably defined to cast to float and use the
overload for float), but we would need to do it for every function in
<math.h>. It's a simple matter of programming, but somebody needs to
do the work.



More information about the Gcc mailing list