On Sun, 30 Mar 2025, LIU Hao wrote:
--
This eliminates such warnings in C:
.../mingw-w64-headers/crt/fenv.h:64:39: warning: ‘__mingw_fe_dfl_env’
initialized and declared ‘extern’
extern const __MINGW_SELECTANY fenv_t __mingw_fe_dfl_env = { 0, 0 };
^~~~~~~~~~~~~~~~~~
Only if compiling in a way where the headers aren't considered system
headers, right - afaik that's the only case where this warning actually is
visible?
and for some unknown reasons, when compiling libquadmath:
math/.libs/x2y2m1q.o: duplicate section
`.rdata$__mingw_fe_pc53_env[__mingw_fe_pc53_env]' has different size
math/.libs/x2y2m1q.o: duplicate section
`.rdata$__mingw_fe_pc64_env[__mingw_fe_pc64_env]' has different size
math/.libs/x2y2m1q.o: duplicate section
`.rdata$__mingw_fe_dfl_env[__mingw_fe_dfl_env]' has different size
math/.libs/acoshq.o: duplicate section
`.rdata$__mingw_fe_pc53_env[__mingw_fe_pc53_env]' has different size
math/.libs/acoshq.o: duplicate section
`.rdata$__mingw_fe_pc64_env[__mingw_fe_pc64_env]' has different size
math/.libs/acoshq.o: duplicate section
`.rdata$__mingw_fe_dfl_env[__mingw_fe_dfl_env]' has different size
...
It would be really valuable if you could figure out why you're getting
such warnings. This kind of header inline comdat definition with
__MINGW_SELECTANY should work, and is used elsewhere, so we should try to
figure out why that doesn't work as expected here.
+const fenv_t __mingw_fe_dfl_env = { 0, 0 };
+const fenv_t __mingw_fe_pc64_env = { 0x3f3f003f, 0 };
+const fenv_t __mingw_fe_pc53_env = { 0x3f3f103f, 0 };
_If_ we go ahead with the patch, I would appreciate if you'd bring along
the comments from the header here - they're intended to explain the
constant values here.
Anyway - I understood that Jacek was/is away on vacation and may be back
next week, so I would appreciate if we can hold off of going ahead with
this patch until he has had an opportunity to respond as well.
(PS, I'd echo the same sentiment as was mentioned on the binutils mailing
list; when the patches are sent as attachments, it requires more manual
effort to respond inline to parts of the patch.)
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public