public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Manuel López-Ibáñez" <lopezibanez@gmail.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [PING^2] Wextra and Wreturn-type interaction (PR7651)
Date: Thu, 01 Mar 2007 18:34:00 -0000	[thread overview]
Message-ID: <6c33472e0703011034i7ae0ff0dr5e0119d8723a798d@mail.gmail.com> (raw)
In-Reply-To: <6c33472e0702200817p7bf60393ud280c02daa7b713a@mail.gmail.com>

PING^2: http://gcc.gnu.org/ml/gcc-patches/2007-02/msg01102.html

Thanks,

Manuel.

On 20/02/07, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
> Please review: http://gcc.gnu.org/ml/gcc-patches/2007-02/msg01102.html
>
> Thanks,
>
> Manuel.
>
> On 12/02/07, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
> > :ADDPATCH C:
> >
> > Wextra gives a warning when a function may return with and without a
> > value, for example:
> >
> > foo (a)
> > {
> >   if (a > 0)
> >     return a;
> > }
> >
> > However, this warning is completely redundant, since Wreturn-type
> > (that is enabled by -Wall) will give a warning for any  'return'
> > without value, in a function whose return-type is not 'void' and about
> > a 'return' with a value, in a function whose return-type is 'void'. I
> > was not able to construct an example for which Wextra warns but
> > Wreturn-type does not.
> >
> > So this patch removes this warning from Wextra and improves the
> > description of Wreturn-type.
> >
> > Boostrapped and regression tested.
> >
> > OK for mainline?
> >
> >
> > 2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
> >
> >   PR middle-end/7651
> >   * doc/invoke.texi (Wreturn-type): Complete description.
> >   (Wextra): Delete item about return-type warning.
> >   * c-decl.c: Delete redundant Wextra warning.
> >
> > testsuite/
> >   * gcc.dg/20030906-1.c: Replace Wextra with Wreturn-type.
> >   * gcc.dg/20030906-2.c: Likewise.
> >   * objc.dg/method-17.m: Add -Wreturn-type.
> >   * obj-c++.dg/method-21.mm: Likewise.
> >
> >
>

  reply	other threads:[~2007-03-01 18:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-12 22:11 Manuel López-Ibáñez
2007-02-20 17:51 ` [PING] " Manuel López-Ibáñez
2007-03-01 18:34   ` Manuel López-Ibáñez [this message]
2007-03-19 21:52     ` [PING^2] " Manuel López-Ibáñez
2007-04-03 22:41       ` Manuel López-Ibáñez

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=6c33472e0703011034i7ae0ff0dr5e0119d8723a798d@mail.gmail.com \
    --to=lopezibanez@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).