https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99832

--- Comment #16 from dave.anglin at bell dot net ---
On 2025-05-29 3:41 p.m., redi at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99832
> 
> --- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> ---
> I suppose another way to resolve this would be to just mark that function
> [[__gnu__::__always_inline__]].
> 
> That would require no config changes at all, we could do it unconditionally.
> 
> Or we could do:
> 
>       // Map to C API
> #ifdef __USE_TIME64_REDIRECTS
>       [[__gnu__::__always_inline__]]
> #endif
>       static std::time_t
>       to_time_t(const time_point& __t) noexcept
>       {
>         return std::time_t(duration_cast<chrono::seconds>
>                            (__t.time_since_epoch()).count());
>       }

Both options appear to be an improvement.  As far as I can tell, there were no
regressions
with your posted patch.

Reply via email to