On Thursday 20 March 2025 20:38:57 Pali Rohár wrote:
> Hello, I started getting new compile warnings during compilation of
> mingw-w64 runtime.
> 
> In file included from math/modfl.c:6:
> .../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 };
>                                        ^~~~~~~~~~~~~~~~~~
> .../mingw-w64-headers/crt/fenv.h:72:39: warning: ‘__mingw_fe_pc64_env’ 
> initialized and declared ‘extern’
>  extern const __MINGW_SELECTANY fenv_t __mingw_fe_pc64_env = { 0x3f3f003f, 0 
> };
>                                        ^~~~~~~~~~~~~~~~~~~
> .../mingw-w64-headers/crt/fenv.h:76:39: warning: ‘__mingw_fe_pc53_env’ 
> initialized and declared ‘extern’
>  extern const __MINGW_SELECTANY fenv_t __mingw_fe_pc53_env = { 0x3f3f103f, 0 
> };
>                                        ^~~~~~~~~~~~~~~~~~~
> 
> I think that it is related to commit 9c27617e016f ("headers: Use
> selectany fenv_t pointers for FE_*_ENV macros.").
> 
> For me it looks really a bad idea to define a global variable in public
> header file with value and also with extern keyword.

Hello, have you looked at this? I think that the "extern" keyword should
be removed here as it is not needed and also cause those gcc warnings.


_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to