From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14342 invoked by alias); 29 Jul 2005 20:53:46 -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 14321 invoked by uid 48); 29 Jul 2005 20:53:42 -0000 Date: Fri, 29 Jul 2005 21:01:00 -0000 From: "thor at math dot tu-berlin dot de" To: gcc-bugs@gcc.gnu.org Message-ID: <20050729205340.23139.thor@math.tu-berlin.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/23139] New: -pedantic -ffast-math breaks working code X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg03921.txt.bz2 List-Id: Using the command line switches -pedantic -ffast-math triggers an error and aborts compilation of code using HUGE_VAL. To reproduce, save the following code as huge.cpp: #include #include int main(int argc,char **argv) { double v = HUGE_VAL; printf("%f\n",v); return 0; } Compile with: g++-4.0 -ffast-math -pedantic huge.cpp Result is: huge.cpp:6:14: warning: use of C99 hexadecimal floating constant huge.cpp:6: error: floating constant exceeds range of 'double' Compilation aborts here. Note that there is a similar bug in the database, namely #11931 that exists at least since g++-3.3.2 and has not been touched yet. Unfortunately, starting with g++-4.0.1, this bug causes an unjustified error (not just a warning) and thus avoids compilation of existing production code. Bug #11931 has been marked as priority "low"; however, since this bug remained in the bug data base for so long now, and since it is now even raised to an error instead of just a warning, I would like to suggest to raise the priority to "normal". And please, please: Could please someone care about this one? So long, and thanks a lot, Thomas -- Summary: -pedantic -ffast-math breaks working code Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: thor at math dot tu-berlin dot de CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23139