I wrote: > Thanks. I've updated my build script to include these for glibc/x86 builds > (except -Werror, which causes a configuration error already in > "checking whether the compiler works...").
But now I see the warnings coming out. I won't use -Wold-style-definition and -Wstrict-prototypes because it leads to pointless warnings in lib/: glob.c:258:1: warning: old-style function definition [-Wold-style-definition] glob.c:1096:1: warning: old-style function definition [-Wold-style-definition] glob.c:1193:1: warning: old-style function definition [-Wold-style-definition] glob.c:1232:1: warning: old-style function definition [-Wold-style-definition] fatal-signal.c:135:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes] fatal-signal.c:135:1: warning: old-style function definition [-Wold-style-definition] fatal-signal.c:180:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes] fatal-signal.c:180:1: warning: old-style function definition [-Wold-style-definition] fatal-signal.c:254:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes] fatal-signal.c:254:1: warning: old-style function definition [-Wold-style-definition] fatal-signal.c:274:1: warning: old-style function definition [-Wold-style-definition] fatal-signal.c:282:1: warning: old-style function definition [-Wold-style-definition] and hundreds of warnings in tests/. Most of them pointless, because an empty function argument list (in a function definition!) is equivalent to (void). Nothing to warn about. I also won't use -Wunused-macros since it produces warnings that are pointless to fix: printf-frexp.c:63:0: warning: macro "L_" is not used tempname.c:70:0: warning: macro "__open64" is not used tempname.c:72:0: warning: macro "__xstat64" is not used fnmatch.c:171:0: warning: macro "STRCOLL" is not used fnmatch.c:199:0: warning: macro "STRCOLL" is not used fnmatch.c:91:0: warning: macro "STREQ" is not used getcwd.c:86:0: warning: macro "__opendir" is not used glob.c:148:0: warning: macro "__stat" is not used glob.c:151:0: warning: macro "__readdir64" is not used glob.c:73:0: warning: macro "DIRENT_MUST_BE" is not used strerror_r.c:23:0: warning: macro "_NETBSD_SOURCE" is not used vasnprintf.c:145:0: warning: macro "DCHAR_SET" is not used vasnprintf.c:210:0: warning: macro "remainder" is not used vasnprintf.c:208:0: warning: macro "exp" is not used vasnprintf.c:273:0: warning: macro "decimal_point_char_defined" is not used -Wstrict-overflow give spurious warnings with gcc 4.5: utimecmp.c:279:14: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow] Even -Wshadow fires back unreasonably: fma.c:393:26: warning: declaration of ‘yn’ shadows a global declaration [-Wshadow] And -Wtype-limits warnings in dead code are not useful either: fma.c:172:7: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] fma.c:210:7: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] fma.c:248:7: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] The fallout is small: 2011-11-20 Bruno Haible <br...@clisp.org> fma: Remove unused code. * lib/fma.c (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): Remove unused macros. --- lib/fma.c.orig Sun Nov 20 15:51:09 2011 +++ lib/fma.c Sun Nov 20 15:44:00 2011 @@ -41,9 +41,6 @@ # define LDEXP ldexpl # define MIN_EXP LDBL_MIN_EXP # define MANT_BIT LDBL_MANT_BIT -# define DECL_ROUNDING DECL_LONG_DOUBLE_ROUNDING -# define BEGIN_ROUNDING() BEGIN_LONG_DOUBLE_ROUNDING () -# define END_ROUNDING() END_LONG_DOUBLE_ROUNDING () # define L_(literal) literal##L #elif ! defined USE_FLOAT # define FUNC fma @@ -52,9 +49,6 @@ # define LDEXP ldexp # define MIN_EXP DBL_MIN_EXP # define MANT_BIT DBL_MANT_BIT -# define DECL_ROUNDING -# define BEGIN_ROUNDING() -# define END_ROUNDING() # define L_(literal) literal #else /* defined USE_FLOAT */ # define FUNC fmaf @@ -63,9 +57,6 @@ # define LDEXP ldexpf # define MIN_EXP FLT_MIN_EXP # define MANT_BIT FLT_MANT_BIT -# define DECL_ROUNDING -# define BEGIN_ROUNDING() -# define END_ROUNDING() # define L_(literal) literal##f #endif -- In memoriam Kerem Yılmazer <http://en.wikipedia.org/wiki/Kerem_Yılmazer>