From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22308 invoked by alias); 19 Jan 2010 22:59:38 -0000 Received: (qmail 22262 invoked by uid 48); 19 Jan 2010 22:59:27 -0000 Date: Tue, 19 Jan 2010 22:59:00 -0000 Message-ID: <20100119225927.22261.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/42809] Too much noise with -Wconversion In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "anlauf at gmx dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-01/txt/msg02364.txt.bz2 ------- Comment #2 from anlauf at gmx dot de 2010-01-19 22:59 ------- (In reply to comment #1) > Well constants don't really need to be warned about if it does fit. But really > an generic integer(4) to real(4) should be warned about really as not all > integer(4) fit into real(4). > That's right. For the conversion of a non-trivial integer(4) expression to real(4) warnings are desired. But for a known integer(4), one could use the knowledge of the Fortran model of reals a check whether the modulus of the integer is smaller than 2/epsilon(0._4). (I hope that I got the factor of two correctly). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42809