* [PATCH] Note that -Wunreachable-code used to be a warning option (PR c/69900)
@ 2016-02-22 21:18 Jakub Jelinek
2016-02-23 11:44 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2016-02-22 21:18 UTC (permalink / raw)
To: gcc-patches
Hi!
While we ignore -Wunreachable-code option now, as we require
that GCC diagnostic options are CL_WARNING only, we should remember
that this is a former Warning option (similarly for -Werror=).
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2016-02-22 Jakub Jelinek <jakub@redhat.com>
PR c/69900
* common.opt (Wunreachable-code): Add Warning flag.
* gcc.dg/pr69900.c: New test.
--- gcc/common.opt.jj 2016-02-16 21:43:38.000000000 +0100
+++ gcc/common.opt 2016-02-22 12:16:53.393949080 +0100
@@ -728,7 +728,7 @@ Common Var(warn_maybe_uninitialized) War
Warn about maybe uninitialized automatic variables.
Wunreachable-code
-Common Ignore
+Common Ignore Warning
Does nothing. Preserved for backward compatibility.
Wunused
--- gcc/testsuite/gcc.dg/pr69900.c.jj 2016-02-22 12:29:22.177681519 +0100
+++ gcc/testsuite/gcc.dg/pr69900.c 2016-02-22 12:29:09.000000000 +0100
@@ -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" } */
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Note that -Wunreachable-code used to be a warning option (PR c/69900)
2016-02-22 21:18 [PATCH] Note that -Wunreachable-code used to be a warning option (PR c/69900) Jakub Jelinek
@ 2016-02-23 11:44 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2016-02-23 11:44 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: GCC Patches
On Mon, Feb 22, 2016 at 10:18 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> While we ignore -Wunreachable-code option now, as we require
> that GCC diagnostic options are CL_WARNING only, we should remember
> that this is a former Warning option (similarly for -Werror=).
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
Ok.
Richard.
> 2016-02-22 Jakub Jelinek <jakub@redhat.com>
>
> PR c/69900
> * common.opt (Wunreachable-code): Add Warning flag.
>
> * gcc.dg/pr69900.c: New test.
>
> --- gcc/common.opt.jj 2016-02-16 21:43:38.000000000 +0100
> +++ gcc/common.opt 2016-02-22 12:16:53.393949080 +0100
> @@ -728,7 +728,7 @@ Common Var(warn_maybe_uninitialized) War
> Warn about maybe uninitialized automatic variables.
>
> Wunreachable-code
> -Common Ignore
> +Common Ignore Warning
> Does nothing. Preserved for backward compatibility.
>
> Wunused
> --- gcc/testsuite/gcc.dg/pr69900.c.jj 2016-02-22 12:29:22.177681519 +0100
> +++ gcc/testsuite/gcc.dg/pr69900.c 2016-02-22 12:29:09.000000000 +0100
> @@ -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" } */
>
> Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-23 11:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-22 21:18 [PATCH] Note that -Wunreachable-code used to be a warning option (PR c/69900) Jakub Jelinek
2016-02-23 11:44 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).