On Tue, 15 Sep 2015, Steve Ellcey wrote:

> I am not sure I like this change.  It broke the GLIBC build for me on
> MIPS.  Basically GLIBC has a header file with initialized static
> constant globals (sysdeps/ieee754/dbl-64/atnat2.h contains tqpi1 and
> qpi1) and that header file is included in multiple .c files like
> sysdeps/ieee754/dbl-64/e_atan2.c that use some, but not all, of those
> static constant variables.  But between the various .c files all of the
> globals are used somewhere, just not in every individual .c file.  This
> seems like a perfectly reasonable use of static globals and header files
> that should not be identified as a warning.

And glibc also uses -fmerge-all-constants, so this C++-style use of static 
variables should be just as efficient as using #define in all cases 
(though since the addresses of the variables aren't taken, it should be 
just as efficient even without -fmerge-all-constants).

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to