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;
}
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public