This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/23139] [3.4/4.0/4.1 Regression] -pedantic -ffast-math breaks working code


------- Additional Comments From joseph at codesourcery dot com  2005-09-06 15:42 -------
Subject: Re:  [3.4/4.0/4.1 Regression] -pedantic -ffast-math
 breaks working code

On Tue, 6 Sep 2005, mmitchel at gcc dot gnu dot org wrote:

> The problem behind both diagnostics fact that the C++ front-end pre-lexes the
> entire source file.  As a result, the lexing routines, which depends on the
> setting of pedantic to determine whether or not to issue errors, are called when
> pedantic is set, even though we are within an __extension__ block.  Because the
> parsing of __extension__ blocks is complex, we need to either (a) eliminate the
> up-front lexing, or (b) defer issuing diagnostics until we are actually in
> position to know the correct value of pedantic.

The lexing diagnostics depend on the preprocessor's setting of pedantic 
(which doesn't take account of parser context in any case), not the 
compiler's.  This looks just like 7263/11931 for which I still prefer (c) 
handle specially expansions of macros defined in system headers.  A 
fixinclude for definitions of HUGE_VAL as a hex float constant is a 
possible workaround.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23139


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]