]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/69900 (Unhelpful diagnostic about Ignored options)
authorJakub Jelinek <jakub@redhat.com>
Tue, 23 Feb 2016 12:57:32 +0000 (13:57 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 23 Feb 2016 12:57:32 +0000 (13:57 +0100)
PR c/69900
* common.opt (Wunreachable-code): Add Warning flag.

* gcc.dg/pr69900.c: New test.

From-SVN: r233630

gcc/ChangeLog
gcc/common.opt
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr69900.c [new file with mode: 0644]

index 2c77b39666d31ddc1c903fb77f62a5bafb01071c..020a1b3485ae3f96290711d9602411486faa900a 100644 (file)
@@ -1,3 +1,8 @@
+2016-02-23  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/69900
+       * common.opt (Wunreachable-code): Add Warning flag.
+
 2016-02-23  Mark Wielaard  <mjw@redhat.com>
            Jakub Jelinek  <jakub@redhat.com>
 
index 3c3669ad271de723d8d7143a94d8fa110f1238a4..bc5b4c4e96b979bfc7ea89065e8899d72b0a85e6 100644 (file)
@@ -728,7 +728,7 @@ Common Var(warn_maybe_uninitialized) Warning EnabledBy(Wuninitialized)
 Warn about maybe uninitialized automatic variables.
 
 Wunreachable-code
-Common Ignore
+Common Ignore Warning
 Does nothing. Preserved for backward compatibility.
 
 Wunused
index 4d2fd4321fbe8dd59800e2d3e86d6bae91b9fcb5..f83aa50ff2e166f8059ca26d00a47429f6add956 100644 (file)
@@ -1,3 +1,8 @@
+2016-02-23  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/69900
+       * gcc.dg/pr69900.c: New test.
+
 2016-02-23  Martin Jambor  <mjambor@suse.cz>
 
        PR tree-optimization/69666
diff --git a/gcc/testsuite/gcc.dg/pr69900.c b/gcc/testsuite/gcc.dg/pr69900.c
new file mode 100644 (file)
index 0000000..2761d9f
--- /dev/null
@@ -0,0 +1,6 @@
+/* PR c/69900 */
+/* { dg-do compile } */
+
+#pragma GCC diagnostic error "-Wunreachable-code"      /* { dg-bogus "is not an option that controls warnings" } */
+#pragma GCC diagnostic warning "-Wunreachable-code"    /* { dg-bogus "is not an option that controls warnings" } */
+#pragma GCC diagnostic ignored "-Wunreachable-code"    /* { dg-bogus "is not an option that controls warnings" } */