bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] manywarnings: enable nicer gcc warning messages


From: Eric Blake
Subject: [PATCH] manywarnings: enable nicer gcc warning messages
Date: Tue, 24 Sep 2013 06:38:34 -0600

With gcc 4.3.4, -Wdisabled-optimization is noisy unless you also
use -funit-at-a-time.

With gcc 4.4.7, there is no indication which warning option
triggered a particular message unless you also use
-fdiagnostics-show-option.

Both of these options are default in newer gcc (such as 4.8.1);
but including them in the list of possible warnings makes the
experience nicer on older platforms.

* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Older gcc requires
some -f options for optimal warnings.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog          | 6 ++++++
 m4/manywarnings.m4 | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 4b6cbdc..211d296 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-09-24  Eric Blake  <address@hidden>
+
+       manywarnings: enable nicer gcc warning messages
+       * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Older gcc requires
+       some -f options for optimal warnings.
+
 2013-09-21  Jim Meyering  <address@hidden>

        timespec: use the new TIMESPEC_RESOLUTION in a few more places
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
index be6d4c9..80b2476 100644
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -1,4 +1,4 @@
-# manywarnings.m4 serial 5
+# manywarnings.m4 serial 6
 dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -204,6 +204,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     -Wvla \
     -Wvolatile-register-var \
     -Wwrite-strings \
+    -fdiagnostics-show-option \
+    -funit-at-a-time \
     \
     ; do
     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]