OSDN Git Service

2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Apr 2010 15:45:52 +0000 (15:45 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:31:08 +0000 (14:31 +0900)
PR 42965
* diagnostic.c (diagnostic_initialize): Initialize
some_warnings_are_errors.
(diagnostic_finish): New.
(diagnostic_action_after_output): Call it before exiting.
(diagnostic_report_diagnostic): Do not print message here. Set
some_warnings_are_errors.
* diagnostic.h (diagnostic_context): Delete
issue_warnings_are_errors_message. Add some_warnings_are_errors.
(diagnostic_finish): Declare.
* toplev.c (toplev_main): Call it before exit.
testsuite/
* gcc.dg/Werror-6.c: Adjust.
* gcc.dg/Werror-implicit-function-declaration.c: Likewise.
* gcc.dg/Werror-4.c: Likewise.
* gcc.dg/Wdeclaration-after-statement-3.c: Likewise.
* gcc.dg/Wswitch-enum-error.c: Likewise.
* gcc.dg/Wpointer-arith.c: Likewise.
* gcc.dg/Wfatal.c: Likewise.
* gcc.dg/Wswitch-error.c: Likewise.
* g++.dg/warn/unused-result1-Werror.c: Likewise.
* gcc.dg/Werror-9.c: Delete. Duplicate of Werror-4.c.
* gcc.dg/cpp/warn-undef-2.c: Likewise.
* gcc.dg/cpp/warn-traditional-2.c: Likewise.
* gcc.dg/cpp/warn-comments-2.c: Likewise.
* gcc.dg/cpp/warn-variadic-2.c: Likewise.
* gcc.dg/cpp/warning-directive-2.c: Likewise.
* gcc.dg/cpp/warn-long-long-2.c: Likewise.
* gcc.dg/cpp/warn-deprecated-2.c: Likewise.
* gcc.dg/cpp/warn-multichar-2.c: Likewise.
* gcc.dg/cpp/warn-normalized-3.c: Likewise.
* gcc.dg/cpp/warn-cxx-compat-2.c: Likewise.
* gcc.dg/cpp/warn-trigraphs-3.c: Likewise.
* gcc.dg/cpp/warn-unused-macros-2.c: Likewise.
* gcc.dg/cpp/warn-trigraphs-4.c: Likewise.
* gcc.dg/cpp/warn-redefined-2.c: Likewise.
* g++.dg/cpp/warning-directive-2.C: Likewise.
* gfortran.dg/warning-directive-2.F90: Likewise.

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

19 files changed:
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp/warning-directive-2.C
gcc/testsuite/gcc.dg/Werror-3.c [deleted file]
gcc/testsuite/gcc.dg/cpp/warn-comments-2.c
gcc/testsuite/gcc.dg/cpp/warn-cxx-compat-2.c
gcc/testsuite/gcc.dg/cpp/warn-deprecated-2.c
gcc/testsuite/gcc.dg/cpp/warn-long-long-2.c
gcc/testsuite/gcc.dg/cpp/warn-multichar-2.c
gcc/testsuite/gcc.dg/cpp/warn-normalized-3.c
gcc/testsuite/gcc.dg/cpp/warn-redefined-2.c
gcc/testsuite/gcc.dg/cpp/warn-traditional-2.c
gcc/testsuite/gcc.dg/cpp/warn-trigraphs-3.c
gcc/testsuite/gcc.dg/cpp/warn-trigraphs-4.c
gcc/testsuite/gcc.dg/cpp/warn-undef-2.c
gcc/testsuite/gcc.dg/cpp/warn-unused-macros-2.c
gcc/testsuite/gcc.dg/cpp/warn-variadic-2.c
gcc/testsuite/gcc.dg/cpp/warning-directive-2.c
gcc/testsuite/gfortran.dg/warning-directive-2.F90

index 0b1d34f..833aa84 100644 (file)
@@ -1,3 +1,17 @@
+2010-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
+
+       PR 42965
+       * diagnostic.c (diagnostic_initialize): Initialize
+       some_warnings_are_errors.
+       (diagnostic_finish): New.
+       (diagnostic_action_after_output): Call it before exiting.
+       (diagnostic_report_diagnostic): Do not print message here. Set
+       some_warnings_are_errors.
+       * diagnostic.h (diagnostic_context): Delete
+       issue_warnings_are_errors_message. Add some_warnings_are_errors.
+       (diagnostic_finish): Declare.
+       * toplev.c (toplev_main): Call it before exit.
+
 2010-04-09  Jason Merrill  <jason@redhat.com>
 
        PR c++/42623
index f650835..0f2fd65 100644 (file)
@@ -1,3 +1,33 @@
+2010-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
+
+       PR 42965
+       * gcc.dg/Werror-6.c: Adjust.
+       * gcc.dg/Werror-implicit-function-declaration.c: Likewise.
+       * gcc.dg/Werror-4.c: Likewise.
+       * gcc.dg/Wdeclaration-after-statement-3.c: Likewise.
+       * gcc.dg/Wswitch-enum-error.c: Likewise.
+       * gcc.dg/Wpointer-arith.c: Likewise.
+       * gcc.dg/Wfatal.c: Likewise.
+       * gcc.dg/Wswitch-error.c: Likewise.
+       * g++.dg/warn/unused-result1-Werror.c: Likewise.
+       * gcc.dg/Werror-9.c: Delete. Duplicate of Werror-4.c.
+       * gcc.dg/cpp/warn-undef-2.c: Likewise.
+       * gcc.dg/cpp/warn-traditional-2.c: Likewise.
+       * gcc.dg/cpp/warn-comments-2.c: Likewise.
+       * gcc.dg/cpp/warn-variadic-2.c: Likewise.
+       * gcc.dg/cpp/warning-directive-2.c: Likewise.
+       * gcc.dg/cpp/warn-long-long-2.c: Likewise.
+       * gcc.dg/cpp/warn-deprecated-2.c: Likewise.
+       * gcc.dg/cpp/warn-multichar-2.c: Likewise.
+       * gcc.dg/cpp/warn-normalized-3.c: Likewise.
+       * gcc.dg/cpp/warn-cxx-compat-2.c: Likewise.
+       * gcc.dg/cpp/warn-trigraphs-3.c: Likewise.
+       * gcc.dg/cpp/warn-unused-macros-2.c: Likewise.
+       * gcc.dg/cpp/warn-trigraphs-4.c: Likewise.
+       * gcc.dg/cpp/warn-redefined-2.c: Likewise.
+       * g++.dg/cpp/warning-directive-2.C: Likewise.
+       * gfortran.dg/warning-directive-2.F90: Likewise.
+
 2010-04-09  Jason Merrill  <jason@redhat.com>
 
        PR c++/42623
index abd6427..c2efc17 100644 (file)
@@ -1,4 +1,4 @@
 // { dg-do preprocess }
 // { dg-options "-fdiagnostics-show-option -Werror=cpp" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 #warning "Printed"  // { dg-error "\"Printed\" .-Wcpp." }
diff --git a/gcc/testsuite/gcc.dg/Werror-3.c b/gcc/testsuite/gcc.dg/Werror-3.c
deleted file mode 100644 (file)
index 9787407..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-Waddress -Wattributes" } */
-
-/* Make sure the command line option enables the warning.  */
-
-void __attribute__((dj)) bar() { }     /* { dg-warning ".* attribute directive ignored" } */
-
-int i;
-
-void
-foo ()
-{
-  if (&i)      /* { dg-warning ".* will always evaluate as 'true'" } */
-    grill ();
-}
index 5a17f2b..107e6bf 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=comments" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 /* /* */  // { dg-error "\"\.\*\" within comment .-Wcomments." }
 
 // \
index 6bf7d55..91cad7c 100644 (file)
@@ -1,4 +1,4 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=c++-compat" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 #define not !  // { dg-error "identifier \"not\" is a special operator name in C\\+\\+ .-Wc\\+\\+-compat." }
index b9cfffb..600e2f6 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=deprecated" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 #assert x(x)  // { dg-error "#assert is a deprecated GCC extension .-Wdeprecated." }
 
 #if #x(x)     // { dg-error "assertions are a deprecated extension .-Wdeprecated." }
index 11eb5fb..08fef13 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wtraditional -Werror=long-long" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 #if 0LL  // { dg-error "traditional C rejects the \"LL\" suffix .-Wlong-long." }
          // { dg-error "use of C99 long long integer constant .-Wlong-long." "use long long" { target *-*-* } 4 }
 #endif
index 31d33bb..38d3a98 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=multichar" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 #if 'abc'  // { dg-error "multi-character character constant .-Wmultichar." }
 #endif
index 380c670..2040394 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -fextended-identifiers -Werror=normalized=" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
         // { dg-prune-output ".*-Werror=normalized=: Set -Wnormalized=nfc.*" }
 \u0F43  // { dg-error "`.U00000f43' is not in NFC .-Wnormalized=." }
index 83cc3df..b943355 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=builtin-macro-redefined" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 #ifndef __TIME__
 #error "__TIME__ builtin is not defined"
 // { dg-bogus "__TIME__ builtin is not defined" "no-time" { target *-*-* } 5 }
index cb5f690..5203c28 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-do compile }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=traditional -Wno-deprecated -Wno-long-long" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 #assert x(x)         // { dg-error "suggest hiding #assert from traditional C with an indented # .-Wtraditional." }
 
  #define X X         // { dg-error "traditional C ignores #define with the # indented .-Wtraditional." }
index a993e2a..586c363 100644 (file)
@@ -1,4 +1,4 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -trigraphs -Werror=trigraphs" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 ??=  // { dg-error "trigraph \\?\\?= converted to # .-Wtrigraphs." }
index 240ae0f..ba0dd51 100644 (file)
@@ -1,4 +1,4 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=trigraphs" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 ??=  // { dg-error "trigraph \\?\\?= ignored, use -trigraphs to enable .-Wtrigraphs." }
index 4eb80e0..c9f8731 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=undef" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 #if x  // { dg-error "\"x\" is not defined .-Wundef." }
 #endif
index 58eeebf..4bd679c 100644 (file)
@@ -1,4 +1,4 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=unused-macros" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 #define X X  // { dg-error "macro \"X\" is not used .-Wunused-macros." }
index f43d96a..8b6d165 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do preprocess } */
 /* { dg-options "-ansi -fdiagnostics-show-option -pedantic -Werror=variadic-macros" } */
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 #define F(...) X   /* { dg-error "anonymous variadic macros were introduced in C99 .-Wvariadic-macros." } */
 
 #define G(X...) X  /* { dg-error "ISO C does not permit named variadic macros .-Wvariadic-macros." } */
index 0889803..753b84a 100644 (file)
@@ -1,4 +1,4 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=cpp" }
-
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
 #warning "Printed"  // { dg-error "\"Printed\" .-Wcpp." }
index 75b78bf..5b40d69 100644 (file)
@@ -1,5 +1,5 @@
 ! { dg-do preprocess }
 ! { dg-options "-std=f95 -fdiagnostics-show-option -Werror=cpp" }
-
+! { dg-warning "some warnings being treated as errors" "" {target "*-*-*"} 0 } 
 #warning "Printed"
 ! { dg-error "\"Printed\" .-Wcpp." "" { target *-*-* } 4 }