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
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
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;
>
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
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
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
>
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
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
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
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.
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
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
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?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment
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
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,
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114018
Jonathan Wakely changed:
What|Removed |Added
Last reconfirmed||2024-02-20
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.
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.
20 matches
Mail list logo