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
parent eeb77d99
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
......
......@@ -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)
{
......
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.
/* { dg-do preprocess } */
/* { dg-options "-std=c++98" } */
#if 1
#endif 1 /* { dg-error "error: extra tokens at end of #endif directive" } */
/* { dg-do preprocess } */
/* { dg-options "-std=c++98 -fpermissive" } */
#if 1
#endif 1 /* { dg-warning "warning: extra tokens at end of #endif directive" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment