https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26926
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Tomasz KamiĆski from comment #3)
> > And there is certainly no need for a libstdc++ wrapper function that takes
> > the existing double version, adds and l, and then casts the long double to
> > double, and calls the double function.
>
> I am not 100% sure, if that answer the question, but the C++ standard
> requires a conforming implementation to provide following declarations, even
> if the sizeof(double) == sizeof(long double).
> constexpr long double acosl(long double x);
> constexpr long double asinl(long double x);
>
> And because double and long double are required to be distinct types, even
> if they size are the same and use same representation.
The exports are different thing from the declarations. I agree the functions
need to be declared, but if not constexpr it can be say just long double
acosl(long double x) __asm ("acos");
for the double same as long double cases.
Sure, for constexpr it can't be, but can be in that case say constexpr long
double acosl(long double __x) { return __builtin_acos(__x); } or so.