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++/24924] New: front end and preprocessor pedantic_errors settings should agree


The C++ front end makes pedwarns into errors by default (unless -fpermissive). 
However, this only applies to front end pedwarns and not to preprocessor ones,
as the preprocessor has its own pedantic_errors setting which is changed by an
explicit -pedantic-errors option but doesn't default to 1 for C++ the way the
global setting does.

There should be a consistent pedantic_errors setting for both compiler and
preprocessor pedwarns.

Test: preprocess a testcase such as

#if 1
#endif 1

and observe it gives a warning which becomes an error with -pedantic-errors,
whereas by the principle followed by the C++ front end it should be an error
which becomes a warning with -fpermissive.


-- 
           Summary: front end and preprocessor pedantic_errors settings
                    should agree
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsm28 at gcc dot gnu dot org


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


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