aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2010-05-06 10:12:36 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2010-05-06 10:12:36 +0000
commit3734d9607ee407f4c73aa613f96dbfbc0dd6f500 (patch)
treedbd0e72df35da905dec3347904aaa7d7fac6dd9d /gcc/testsuite
parent2b90475adda974b77287699beb1180d1cd6e286b (diff)
downloadgcc-3734d9607ee407f4c73aa613f96dbfbc0dd6f500.zip
gcc-3734d9607ee407f4c73aa613f96dbfbc0dd6f500.tar.gz
gcc-3734d9607ee407f4c73aa613f96dbfbc0dd6f500.tar.bz2
re PR c/40989 (-Werror= and #pragma diagnostics do not work with group flags)
2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org> PR 40989 * doc/invoke.texi (Wimplicit): Document as C only. * opts.c (common_handle_option): Add argument kind. (handle_option): Rename as read_cmdline_option. Factor out code to... (handle_option): ... here. New. (handle_options): Rename as read_cmdline_options. (decode_options): Update call. (set_option): Use option index instead of option pointer. Classify diagnostics correctly. (enable_warning_as_error): Call handle_option. * opts.h (set_option): Update declaration. (handle_option): Declare. * langhooks.h (struct lang_hooks): Add argument kind to handle_option. * c.opt (Wimplicit,Wimplicit-int): Initialize to -1. * c-opts.c (set_Wimplicit): Delete. (c_family_lang_mask): New static constant. (c_common_handle_option): Add argument kind. Use handle_option instead of set_Wimplicit. (c_common_post_options): warn_implicit and warn_implicit_int are disabled by default. * c-common.c (warn_implicit): Do not define here. * c-common.h (warn_implicit): Do not declare here. (c_common_handle_option): Update declaration. * lto-opts.c (lto_reissue_options): Update call to set_option. java/ * lang.c (java_handle_option): Add argument kind. fortran/ * options.c (gfc_handle_option): Add argument kind. * gfortran.h (gfc_handle_option): Update declaration. ada/ * gcc-interface/misc.c (gnat_handle_option): Add argument kind. testsuite/ * gcc.dg/pr40989.c: New. From-SVN: r159102
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr40989.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2eebcf3..6b4584e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR 40989
+ * gcc.dg/pr40989.c: New.
+
2010-05-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43934
diff --git a/gcc/testsuite/gcc.dg/pr40989.c b/gcc/testsuite/gcc.dg/pr40989.c
new file mode 100644
index 0000000..0fbc870
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr40989.c
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-Werror=implicit" } */
+int main() {
+ return pippo(); /* { dg-error "" } */
+}
+/* { dg-message "warnings being treated as errors" "" { target *-*-* } 0 } */