From patchwork Sun Aug 26 21:38:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 180091 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 38F332C00E7 for ; Mon, 27 Aug 2012 07:39:15 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1346621955; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=jpHAngB 7HmAvL7zKvRNVJGlbnR4=; b=WXGJ87AH+w8zaMuM7jYtjYJADzhl34oXzjeo/i+ Ad5InF+wfl3ZUbnabkB+xXrWW+AaAopPHDzjXVoH/+o2ls9fJZV3fmZgT/VUtqRH HXVXXh3OGvsbZesnnHbaeQJpZ5I9CR0AAOsTvD34ktUf4P8540ZRDSFr6yRmSljm iAwg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=iLfCRfw593bLlLSXhs55Nlfd4vcET54wyG6JCs9Ezht71AeJRGMzOB/MuivKv4 3eFW6mHwJAs4aHiQ5kfLHalkHbzqc7D65ld93cgdtOCODax4+Gx3oDE5wpgSWnzW mtwrd9VaPmyh3Jjk2gAOZtOpmfOs9wRNhz0oerTRMMeZ0=; Received: (qmail 30634 invoked by alias); 26 Aug 2012 21:39:11 -0000 Received: (qmail 30616 invoked by uid 22791); 26 Aug 2012 21:39:10 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mx01.qsc.de (HELO mx01.qsc.de) (213.148.129.14) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 26 Aug 2012 21:38:57 +0000 Received: from [192.168.178.22] (port-92-204-67-8.dynamic.qsc.de [92.204.67.8]) by mx01.qsc.de (Postfix) with ESMTP id 5ADCE3CB87; Sun, 26 Aug 2012 23:38:54 +0200 (CEST) Message-ID: <503A976C.3050201@net-b.de> Date: Sun, 26 Aug 2012 23:38:52 +0200 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: gcc patches , gfortran Subject: [Patch, Fortran] Make -Wall no longer imply -Wcompare-reals Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Dear all, while -Wcompare-reals is a useful option to find bugs, practical experience and the discussion here and on c.l.f has shown that this option has too many false positives. Hence, it is not suitable for -Wall. With patch, -Wall no longer implies -Wcompare-reals. Build on x86-64-linux. OK for the trunk? Tobias PS: I will update wiki/GFortran#news after the committal. 2012-08-26 Tobias Burnus * options.c (set_Wall): Don't set for -Wcompare-reals. * invoke.texi (-Wall, -Wcompare-reals): -Wall no longer implies -Wcompare-reals. diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index dfd4ca7..d5fdee3 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -727,7 +727,7 @@ warnings. Enables commonly used warning options pertaining to usage that we recommend avoiding and that we believe are easy to avoid. This currently includes @option{-Waliasing}, @option{-Wampersand}, -@option{-Wconversion}, @option{-Wcompare-reals}, @option{-Wsurprising}, +@option{-Wconversion}, @option{-Wsurprising}, @option{-Wintrinsics-std}, @option{-Wno-tabs}, @option{-Wintrinsic-shadow}, @option{-Wline-truncation}, @option{-Wtarget-lifetime}, @option{-Wreal-q-constant} and @option{-Wunused}. @@ -939,7 +939,6 @@ allocatable variable; this includes scalars and derived types. @item -Wcompare-reals @opindex @code{Wcompare-reals} Warn when comparing real or complex types for equality or inequality. -Enabled by @option{-Wall}. @item -Wtarget-lifetime @opindex @code{Wtargt-lifetime} diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index cbec705..764f570 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -475,7 +475,6 @@ set_Wall (int setting) gfc_option.warn_character_truncation = setting; gfc_option.warn_real_q_constant = setting; gfc_option.warn_unused_dummy_argument = setting; - gfc_option.warn_compare_reals = setting; gfc_option.warn_target_lifetime = setting; warn_return_type = setting;