[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-05-21 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 Jakub Jelinek changed: What|Removed |Added Target Milestone|13.3|13.4 --- Comment #19 from Jakub

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 Jonathan Wakely changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-21 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #18 from Jakub Jelinek --- (In reply to Jonathan Wakely from comment #15) > void nexttoward(float32_t, long double) = delete; > void nexttoward(float64_t, long double) = delete; > void nexttoward(float128_t, long double) = delete; >

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #17 from Jonathan Wakely --- Or just: template __enable_if_t::value> nexttoward(_Tp, long double) = delete; So that it is present for C++11 and so works when _Float32 and _Float64 names are used instead of the C++23

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #16 from Jonathan Wakely --- We could also just add: #if __cplusplus > 202002L template void nexttoward(_Tp, long double) = delete; #endif The existing overloads would be preferred for float, double, long double and

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #15 from Jonathan Wakely --- (In reply to Jakub Jelinek from comment #13) > Then I wonder what was the reason for the final LWG3790 revision, the middle > proposed resolution seems to be much more readable and understandable where >

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-21 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #14 from Jakub Jelinek --- Ah, it is described in https://eel.is/c++draft/cmath.syn#2 and probably due to https://eel.is/c++draft/cmath.syn#3 (so that one can use std::nexttoward(42, 53.0L); as it has just one floating-point-type

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-21 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #13 from Jakub Jelinek --- Then I wonder what was the reason for the final LWG3790 revision, the middle proposed resolution seems to be much more readable and understandable where one could see exactly what is valid in the synopsis

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-21 Thread de34 at live dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 Jiang An changed: What|Removed |Added CC||de34 at live dot cn --- Comment #12 from

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-20 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #11 from Jakub Jelinek --- But what about following: #include #include auto f = static_cast(::nexttoward); This doesn't call std::nexttoward(std::float128_t, long double), just checks if it is defined.

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-20 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #10 from Jonathan Wakely --- (In reply to Jakub Jelinek from comment #8) > So, do we need to define those and std::unreachable (); in their bodies or > something similar? No, it needs to be ill-formed to call them, which is already

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-20 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #9 from Jakub Jelinek --- (In reply to Jakub Jelinek from comment #8) > So, do we need to define those and std::unreachable (); in their bodies or > something similar? Though, cmath probably can't #include , so #ifdef

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-20 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #8 from Jakub Jelinek --- So, do we need to define those and std::unreachable (); in their bodies or something similar?

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-20 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #6 from Andrew Pinski --- I know cppreference is not the standard exactly but it does have the following about nexttoward: However, an invocation of std::nexttoward is ill-formed if the argument corresponding to from has extended

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-20 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #5 from Jakub Jelinek --- If you want a function with 2 arguments of the same type, that is std::nextafter. In C, nexttoward{f,,l} has first argument of float, double and long double, so the last one is always long double. Now,

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-20 Thread jsm28 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #4 from Joseph S. Myers --- I don't know what's expected for C++, but for C, TS 18661-3 and C23 don't have versions of nexttoward for _FloatN or _FloatNx (recall that the second argument of nexttoward has type long double

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-20 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2024-02-20

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #2 from Andrew Pinski --- So if godbolt uses an older version of glibc for x86_64 then report it to them not us.

[Bug libstdc++/114018] std::nexttoward is not implemented for C++23-FP-Types

2024-02-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018 --- Comment #1 from Andrew Pinski --- This depends on the version of glibc to include the c version of these functions. So this is most likely just an artifact of not having a new enough glibc.