diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2008-01-14 19:21:38 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2008-01-14 19:21:38 +0000 |
commit | 8103eebfb73229a018f22718665864730e43c58f (patch) | |
tree | 06d06b2ba2f1af178b052bf31c947e63859759e2 /gcc | |
parent | eeb77d993d4ee82eb43cfabc3e7bb48a0dec66d3 (diff) | |
download | gcc-8103eebfb73229a018f22718665864730e43c58f.zip gcc-8103eebfb73229a018f22718665864730e43c58f.tar.gz gcc-8103eebfb73229a018f22718665864730e43c58f.tar.bz2 |
re PR c++/24924 (front end and preprocessor pedantic_errors settings should agree)
2008-01-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/24924
* c-opts (c_common_post_options): Do not enable CPP
flag_pedantic_errors by default.
testsuite/
* g++.dg/cpp/pedantic-errors.C: Delete.
* g++.dg/cpp/permissive.C: Delete.
From-SVN: r131530
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-opts.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp/pedantic-errors.C | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp/permissive.C | 5 |
5 files changed, 20 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d463d4e..676637f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-01-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org> + + PR c++/24924 + * c-opts (c_common_post_options): Do not enable CPP + flag_pedantic_errors by default. + 2008-01-14 Eric Botcazou <ebotcazou@adacore.com> PR rtl-optimization/31944 diff --git a/gcc/c-opts.c b/gcc/c-opts.c index 951118c..ee9b7ac 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -1102,7 +1102,14 @@ c_common_post_options (const char **pfilename) if (!flag_permissive) { flag_pedantic_errors = 1; - cpp_opts->pedantic_errors = 1; + /* FIXME: For consistency pedantic_errors should have the + same value in the front-end and in CPP. However, this + will break existing applications. The right fix is + disentagle flag_permissive from flag_pedantic_errors, + create a new diagnostic function permerror that is + controlled by flag_permissive and convert most C++ + pedwarns to this new function. + cpp_opts->pedantic_errors = 1; */ } if (!flag_no_inline) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6a6d9b9..f4bb665 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-01-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org> + + PR c++/24924 + * g++.dg/cpp/pedantic-errors.C: Delete. + * g++.dg/cpp/permissive.C: Delete. + 2008-01-14 Eric Botcazou <ebotcazou@adacore.com> * gcc.c-torture/compile/20080114-1.c: New test. diff --git a/gcc/testsuite/g++.dg/cpp/pedantic-errors.C b/gcc/testsuite/g++.dg/cpp/pedantic-errors.C deleted file mode 100644 index 45382b4..0000000 --- a/gcc/testsuite/g++.dg/cpp/pedantic-errors.C +++ /dev/null @@ -1,5 +0,0 @@ -/* { dg-do preprocess } */ -/* { dg-options "-std=c++98" } */ - -#if 1 -#endif 1 /* { dg-error "error: extra tokens at end of #endif directive" } */ diff --git a/gcc/testsuite/g++.dg/cpp/permissive.C b/gcc/testsuite/g++.dg/cpp/permissive.C deleted file mode 100644 index cca1a5d..0000000 --- a/gcc/testsuite/g++.dg/cpp/permissive.C +++ /dev/null @@ -1,5 +0,0 @@ -/* { dg-do preprocess } */ -/* { dg-options "-std=c++98 -fpermissive" } */ - -#if 1 -#endif 1 /* { dg-warning "warning: extra tokens at end of #endif directive" } */ |