public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Sylvain Pion <Sylvain.Pion@sophia.inria.fr> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c++/7616: New warning request Date: Fri, 16 Aug 2002 14:56:00 -0000 [thread overview] Message-ID: <20020816210600.13044.qmail@sources.redhat.com> (raw) The following reply was made to PR c++/7616; it has been noted by GNATS. From: Sylvain Pion <Sylvain.Pion@sophia.inria.fr> To: Andrew Pinski <pinskia@physics.uc.edu> Cc: Sylvain.Pion@sophia.inria.fr, gcc-gnats@gcc.gnu.org Subject: Re: c++/7616: New warning request Date: Fri, 16 Aug 2002 23:01:26 +0200 On Fri, Aug 16, 2002 at 04:41:54PM -0400, Andrew Pinski wrote: > gcc does warn in a slightly different case with `-W -Wall': > struct A > { > int i; > void f(int i) const; > }; > > void A::f(int i) const > { > > } > > It is a know problem with gcc and inlined functions. I'm not talking about the "unused argument" warning. Sorry if I was not clear. What I would like is a new warning that tells me that I'm hiding the data member's name with the member function's argument name. The updated code below shows a situation where I would like a warning (and SunPRO emits one) : struct A { int i; void f(int i) const; }; void A::f(int i) const { (void) i; // I use i somehow, but did I meant A::i or the argument i ??? } -- Sylvain
next reply other threads:[~2002-08-16 21:06 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-08-16 14:56 Sylvain Pion [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-08-17 1:56 gdr 2002-08-16 18:16 Sylvain Pion 2002-08-16 14:06 Andrew Pinski 2002-08-16 13:46 Sylvain.Pion
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=20020816210600.13044.qmail@sources.redhat.com \ --to=sylvain.pion@sophia.inria.fr \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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: linkBe 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).