> 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
overloa
On Thu, Jun 24, 2021 at 7:26 PM ALO via Gcc wrote:
> foo.c: In function '__fp16 foo(__fp16, __fp16)':
> foo.c:6:23: error: call of overloaded 'exp(__fp16&)' is ambiguous
> 6 | return a + std::exp(b);
> | ^
>
No, there isn't a solution for this. You might want to try an ARM port
clang/gcc to see
#include
__fp16 foo (__fp16 a, __fp16 b)
{
return a + std::exp(b);
}
compiler options:
=
riscv64-unknown-linux-gnu-g++ foo.c -march=rv64gc_zfh -mabi=lp64
error:
==
foo.c: In function '__fp16 foo(__fp16, __fp16)':
foo.c:6:23: error: call of overloaded 'exp(__fp16&)' is ambi