在 2026-2-25 04:50, Pali Rohár 写道:
The purpose of volatile for wmainptr should be that the variable wmainptr
is not optimized out. So the volatile has to be set on the variable and not
to its pointer value.
---
  mingw-w64-crt/testcases/t_tmain.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mingw-w64-crt/testcases/t_tmain.c 
b/mingw-w64-crt/testcases/t_tmain.c
index 57f5acafcc17..54d39f0211e2 100644
--- a/mingw-w64-crt/testcases/t_tmain.c
+++ b/mingw-w64-crt/testcases/t_tmain.c
@@ -8,7 +8,7 @@
  int
  _tmain (void)
  {
-  volatile void *wmainptr = wmain;
+  void *volatile wmainptr = wmain;
    (void)wmainptr;
    return 0;
  }

This change looks harmless, so pushed.


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to