在 5/4/21 2:48 AM, Martin Storsjö 写道:
Sure. However in practice, with e.g. code like this:
typedef void (*fp)(void);
_Atomic fp ptr1 = ((void(*)(void))0);
_Atomic fp ptr2 = ((void*)0);
Clang accepts ptr1 but errors out on ptr2: https://gcc.godbolt.org/z/3YW6EsGP4
It looks like a bug. As per
On Mon, 3 May 2021, Jacek Caban wrote:
I'd say that we should skip it altogether. Atomic operations seem
totally redundant in this case. What would it protect from? It won't
prevent multiple GetProcAddress calls - for that we'd need a critical
section. Since GetProcAddress will always return t
On Mon, 3 May 2021, Liu Hao wrote:
在 2021-05-03 20:52, Martin Storsjö 写道:
On Mon, 3 May 2021, Christian Franke wrote:
Would plain '... = 0' without cast also work ? IIRC it should since C89
:-)
That doesn't work either - clang seems to consider the cast (either
implicit or explicit) betwee
在 2021-05-03 20:52, Martin Storsjö 写道:
On Mon, 3 May 2021, Christian Franke wrote:
Would plain '... = 0' without cast also work ? IIRC it should since C89 :-)
That doesn't work either - clang seems to consider the cast (either implicit or explicit) between a
integer or pointer-to-integer and
On 5/3/21 2:52 PM, Martin Storsjö wrote:
On Mon, 3 May 2021, Christian Franke wrote:
Would plain '... = 0' without cast also work ? IIRC it should since
C89 :-)
That doesn't work either - clang seems to consider the cast (either
implicit or explicit) between a integer or pointer-to-integer a
在 2021-05-03 20:30, Christian Franke 写道:
Would plain '... = 0' without cast also work ? IIRC it should since C89 :-)
Alternative: Leave '/* = 0 */' only as a comment. There is no need to
set a static variable to 0.
Either using `= 0` as the initializer or omitting it should work. I don't
On Mon, 3 May 2021, Christian Franke wrote:
Would plain '... = 0' without cast also work ? IIRC it should since C89 :-)
That doesn't work either - clang seems to consider the cast (either
implicit or explicit) between a integer or pointer-to-integer and a
pointer-to-function as something whi
Martin Storsjö wrote:
On Mon, 3 May 2021, Martin Storsjö wrote:
On Mon, 3 May 2021, Christian Franke wrote:
Liu Hao wrote:
在 2021-05-03 14:49, Martin Storsjö 写道:
Just for the record - I wouldn't mind applying the patch or
something like it. I agree with the arguments that it would be
ben
On Mon, 3 May 2021, Martin Storsjö wrote:
On Mon, 3 May 2021, Christian Franke wrote:
Liu Hao wrote:
在 2021-05-03 14:49, Martin Storsjö 写道:
Just for the record - I wouldn't mind applying the patch or something
like it. I agree with the arguments that it would be beneficial to get
more pre
On Mon, 3 May 2021, Christian Franke wrote:
Liu Hao wrote:
在 2021-05-03 14:49, Martin Storsjö 写道:
Just for the record - I wouldn't mind applying the patch or something like
it. I agree with the arguments that it would be beneficial to get more
precision here, even if one in general maybe ca
Liu Hao wrote:
在 2021-05-03 14:49, Martin Storsjö 写道:
Just for the record - I wouldn't mind applying the patch or something
like it. I agree with the arguments that it would be beneficial to
get more precision here, even if one in general maybe can argue that
we don't strictly need to provid
Liu Hao wrote:
在 2021-04-29 03:34, Christian Franke 写道:
BTW.2: The *ftime*() functions from newer versions of MSVC CRT also use
GetSystemTimePreciseAsFileTime() if available.
UCRTBASE.DLL still uses `GetSystemTimeAsFileTime()`.
A test program build with VS2019 and estimation of the UCR
在 2021-05-03 15:44, Martin Storsjö 写道:
On Sun, 25 Apr 2021, Martin Storsjö wrote:
Also move the declaration to corecrt_startup.h, and add a declaration
of the corresponding _crt_quick_at_exit.
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/crt/ucrtbase_compat.c | 5 ++---
mingw-w64-header
On Mon, 26 Apr 2021, Liu Hao wrote:
在 2021-04-26 04:20, Martin Storsjö 写道:
The exact behaviour for cases 3-5 differ between whether the two are linked
dynamically or statically against the CRT. I'm not sure if all the nuances
are worth mimicing though. (A function registered with at_quick_ex
在 2021-05-03 14:49, Martin Storsjö 写道:
Just for the record - I wouldn't mind applying the patch or something like it. I agree with the
arguments that it would be beneficial to get more precision here, even if one in general maybe can
argue that we don't strictly need to provide such precision.
On Sun, 25 Apr 2021, Martin Storsjö wrote:
Also move the declaration to corecrt_startup.h, and add a declaration
of the corresponding _crt_quick_at_exit.
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/crt/ucrtbase_compat.c | 5 ++---
mingw-w64-headers/crt/corecrt_startup.h | 2 ++
2 files c
16 matches
Mail list logo