From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4237 invoked by alias); 6 Sep 2005 22:03:42 -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 4168 invoked by uid 48); 6 Sep 2005 22:03:28 -0000 Date: Tue, 06 Sep 2005 22:03:00 -0000 Message-ID: <20050906220328.4167.qmail@sourceware.org> From: "mmitchel at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050729205340.23139.thor@math.tu-berlin.de> References: <20050729205340.23139.thor@math.tu-berlin.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/23139] [3.4/4.0/4.1 Regression] -pedantic -ffast-math breaks working code X-Bugzilla-Reason: CC X-SW-Source: 2005-09/txt/msg00730.txt.bz2 List-Id: ------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-09-06 22:03 ------- The "floating constant exceeds range" message comes from interpret_float in c-lex.c, which does test just "pedantic", rather than CPP_PEDANTIC(pfile). So, while the preprocessor warning about use of a hexadecimal floating constant does seem to be like the other PRs, the actual pedwarn/error is coming from the fact the C++ front end is pre-lexing tokens. I agree that disabling warnings in expansions of macros from system headers is a good idea, independently of whether or not any other changes might be appropriate to deal with other uses of __extension__. There are certain to be system headers not using __extension__ in macro definitions, on some systems. I guess we could have the preprocessor insert a special token to mark the start/stop of a macro expansion, with an indicator of the location of the macro definition, including its system-headerness. Then, the front end could clear/reset pedantic when seeing these tokens. This would also allow us to issue diagnostics based on the location of the macro, rather than its user, if we wanted. A more brutal approach would be to have the preprocessor simulate #include'ing the file from which the macro came when doing the expansion. That would not require updating the front-ends, but would be more confusing to users. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at codesourcery dot | |com, joseph at codesourcery | |dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23139