bug-gnulib
[Top][All Lists]
Advanced

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

Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-


From: Eric Blake
Subject: Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length
Date: Tue, 29 Nov 2011 15:02:24 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

On 11/29/2011 02:46 PM, Eric Blake wrote:
>> Unless there are objections (portability?)
> 
> Aargh.  I just reread C99.
> 
> F (and f) for float, and L (or l) for long double are required, but D
> (or d) for double is a GNU extension.
> 
> Since we can't silence the warning without adding an explicit 'D', but
> 'D' is not standardized, I have changed my mind.  Let's nuke the warning.

So for starters, I'm pushing this:

From b84c90b17e947a5140857d646c7ed7396c129898 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 29 Nov 2011 15:01:22 -0700
Subject: [PATCH] manywarnings: drop -Wunsuffixed-float-constants

* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): C99 does not allow
'1.0D', which is the only way to silence this warning for 'double'.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog          |    4 ++++
 m4/manywarnings.m4 |    3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f90fd61..48857f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-11-29  Eric Blake  <address@hidden>

+       manywarnings: drop -Wunsuffixed-float-constants
+       * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): C99 does not allow
+       '1.0D', which is the only way to silence this warning for 'double'.
+
        maint.mk: add syntax check for use of compare from init.sh
        * top/maint.mk (sc_prohibit_reversed_compare_failure): New rule,
        moved here from coreutils.
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
index 6e78c07..23bc61c 100644
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -1,4 +1,4 @@
-# manywarnings.m4 serial 1
+# manywarnings.m4 serial 2
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -171,7 +171,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     -Wsuggest-attribute=noreturn \
     -Wsuggest-attribute=pure \
     -Wtrampolines \
-    -Wunsuffixed-float-constants \
     ; do
     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
   done
-- 
1.7.7.3



-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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