public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Note that -Wunreachable-code used to be a warning option (PR c/69900)
Date: Tue, 23 Feb 2016 11:44:00 -0000	[thread overview]
Message-ID: <CAFiYyc3FvwBqjmS-xTu5G5nGhWjmanRSvyKWG4RuW3f2rd3VGg@mail.gmail.com> (raw)
In-Reply-To: <20160222211825.GR3017@tucnak.redhat.com>

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

      reply	other threads:[~2016-02-23 11:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 21:18 Jakub Jelinek
2016-02-23 11:44 ` Richard Biener [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFiYyc3FvwBqjmS-xTu5G5nGhWjmanRSvyKWG4RuW3f2rd3VGg@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).