From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15038 invoked by alias); 5 Apr 2005 13:50:14 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 14945 invoked by uid 48); 5 Apr 2005 13:50:05 -0000 Date: Tue, 05 Apr 2005 13:50:00 -0000 From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20050405134948.20764.dcb314@hotmail.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/20764] New: value won't fit in type X-Bugzilla-Reason: CC X-SW-Source: 2005-04/txt/msg00454.txt.bz2 List-Id: Given the following C++ source code float fred = 1.0e50; The float data type maximum value is around 1.0e38 on my machine, so fred will not fit. gcc 3.4 snapshot for 20050401 fails to detect this. dcb@linux:~/C++/Alphasrc> ~/gnu/20050401/results/bin/g++ -g -c -O2 -Wall floatVal.cc dcb@linux:~/C++/Alphasrc> ~/gnu/20050401/results/bin/g++ -g -c -O2 -Wall -ansi -pedantic floatVal.cc Here is Intel icc 8.1 doing what I want dcb@linux:~/C++/Alphasrc> icc -c floatVal.cc floatVal.cc(2): warning #264: floating-point value does not fit in required floating-point type float fred = 1.0e50; ^ -- Summary: value won't fit in type Product: gcc Version: 3.4.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dcb314 at hotmail dot com CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: linux-pc-i686 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20764