Re: [PATCH] [PR77760] [libstdc++] encode __time_get_state in tm

2023-02-23 Thread Jonathan Wakely via Gcc-patches
On Thu, 23 Feb 2023 at 17:55, Alexandre Oliva wrote: > > On Feb 22, 2023, Alexandre Oliva wrote: > > >> Just curious, why doesn't the pmf hack work on arm-vxworks7? > > > At first, I thought we were running into this just because we have to > > define __clang__ because of some vxworks system

Re: [PATCH] [PR77760] [libstdc++] encode __time_get_state in tm

2023-02-23 Thread Alexandre Oliva via Gcc-patches
On Feb 22, 2023, Alexandre Oliva wrote: >> Just curious, why doesn't the pmf hack work on arm-vxworks7? > At first, I thought we were running into this just because we have to > define __clang__ because of some vxworks system headers aimed at clang. > But even as I tried to drop the #ifndef,

Re: [PATCH] [PR77760] [libstdc++] encode __time_get_state in tm

2023-02-22 Thread Alexandre Oliva via Gcc-patches
On Feb 17, 2023, Jakub Jelinek wrote: > My worry is that people often invoke the time_get APIs on uninitialized > struct tm. Yeah. I thought you meant get(), but it looks like you meant do_get() as well. I seem to have overread the permissions to overwrite tm members, to update its current

Re: [PATCH] [PR77760] [libstdc++] encode __time_get_state in tm

2023-02-17 Thread Jakub Jelinek via Gcc-patches
On Fri, Feb 17, 2023 at 04:47:45AM -0300, Alexandre Oliva wrote: > > On platforms that fail the ptrtomemfn-cast-to-pfn hack, such as > arm-*-vxworks*, time_get fails with %I and %p because the state is not > preserved across do_get calls. > > This patch introduces an alternate hack, that encodes

[PATCH] [PR77760] [libstdc++] encode __time_get_state in tm

2023-02-16 Thread Alexandre Oliva via Gcc-patches
On platforms that fail the ptrtomemfn-cast-to-pfn hack, such as arm-*-vxworks*, time_get fails with %I and %p because the state is not preserved across do_get calls. This patch introduces an alternate hack, that encodes the state in unused bits of struct tm before calling do_get, extracts them