OSDN Git Service

2008-01-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Jan 2008 19:21:38 +0000 (19:21 +0000)
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Jan 2008 19:21:38 +0000 (19:21 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131530 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-opts.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp/pedantic-errors.C [deleted file]
gcc/testsuite/g++.dg/cpp/permissive.C [deleted file]

index d463d4e..676637f 100644 (file)
@@ -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
index 951118c..ee9b7ac 100644 (file)
@@ -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)
        {
index 6a6d9b9..f4bb665 100644 (file)
@@ -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 (file)
index 45382b4..0000000
+++ /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 (file)
index cca1a5d..0000000
+++ /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" } */