diff mbox

[COMMITTED] Add missing #include in get-rounding-mode.h

Message ID 20140623210855.C470A2C39AB@topped-with-meat.com
State Committed
Headers show

Commit Message

Roland McGrath June 23, 2014, 9:08 p.m. UTC
Some recent change (to some other file, not sure off hand what)
caused a warning explosion.  Please keep an eye out for that, folks.


Thanks,
Roland


	* sysdeps/generic/get-rounding-mode.h: Include <stdlib.h> before
	using abort.

Comments

Will Newton June 24, 2014, 7:37 a.m. UTC | #1
On 23 June 2014 22:08, Roland McGrath <roland@hack.frob.com> wrote:
> Some recent change (to some other file, not sure off hand what)
> caused a warning explosion.  Please keep an eye out for that, folks.

I guess that would have been a change I committed,
e6d90d675d4cae810be76a5ff41b8ae8bd6bc914, but I didn't see any
warnings generated for some reason. Thanks for fixing it up.
Roland McGrath June 24, 2014, 8:17 p.m. UTC | #2
The nest of implicit includes is beyond anyone's keeping track of, so
miscellaneous cleanups can have this effect and it's not a big deal to
fix it up.  It could well have been someone else's change after yours
that somehow made the difference.  Everyone should just remember to look
for warnings.  (It will get much easier to notice them again when we clean
up the -Wundef fallout.)


Thanks,
Roland
Joseph Myers June 24, 2014, 8:35 p.m. UTC | #3
On Tue, 24 Jun 2014, Roland McGrath wrote:

> The nest of implicit includes is beyond anyone's keeping track of, so
> miscellaneous cleanups can have this effect and it's not a big deal to
> fix it up.  It could well have been someone else's change after yours
> that somehow made the difference.  Everyone should just remember to look
> for warnings.  (It will get much easier to notice them again when we clean
> up the -Wundef fallout.)

Once the -Wundef fallout is resolved, I hope we can move to building with 
-Werror by default (with some suitable policy about using 
-Wno-error=whatever or -Wno-whatever when warnings, possibly depending on 
the compiler version, seem hard to fix - probably including comments about 
what the warnings are and what platforms / GCC versions they are seen 
with, to help guide future review of such -Wno- settings; existing -Wno- 
uses could also do with such review).
Roland McGrath June 24, 2014, 8:36 p.m. UTC | #4
> Once the -Wundef fallout is resolved, I hope we can move to building with 
> -Werror by default (with some suitable policy about using 
> -Wno-error=whatever or -Wno-whatever when warnings, possibly depending on 
> the compiler version, seem hard to fix - probably including comments about 
> what the warnings are and what platforms / GCC versions they are seen 
> with, to help guide future review of such -Wno- settings; existing -Wno- 
> uses could also do with such review).

Agreed (in principle, with picayunities to be hashed out).
Paul Eggert June 24, 2014, 9:09 p.m. UTC | #5
On 06/24/2014 01:35 PM, Joseph S. Myers wrote:
> I hope we can move to building with
> -Werror by default (with some suitable policy about using
> -Wno-error=whatever or -Wno-whatever

To do that, I suggest taking a look at Gnulib's manywarnings module, 
which lets the maintainer tailor the warnings desired, and which 
arranges for 'configure' to check for the warnings that actually work 
with the compiler version being used to build.
diff mbox

Patch

--- a/sysdeps/generic/get-rounding-mode.h
+++ b/sysdeps/generic/get-rounding-mode.h
@@ -20,6 +20,7 @@ 
 #define _GET_ROUNDING_MODE_H	1
 
 #include <fpu_control.h>
+#include <stdlib.h>
 
 /* Define values for FE_* modes not defined for this architecture.  */
 #ifdef FE_DOWNWARD