PR c/69900
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Feb 2016 12:57:32 +0000 (12:57 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Feb 2016 12:57:32 +0000 (12:57 +0000)
* common.opt (Wunreachable-code): Add Warning flag.

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

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

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

index 2c77b39..020a1b3 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 3c3669a..bc5b4c4 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 4d2fd43..f83aa50 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" } */