public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/78147] The -Wshadow warning is too aggressive with constructor parameters
       [not found] <bug-78147-4@http.gcc.gnu.org/bugzilla/>
@ 2020-07-31 23:30 ` tilkax at gmail dot com
  2022-02-04 11:14 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: tilkax at gmail dot com @ 2020-07-31 23:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78147

Tillmann Karras <tilkax at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tilkax at gmail dot com

--- Comment #5 from Tillmann Karras <tilkax at gmail dot com> ---
Ping.

This warning is useful, but as was pointed out in comment #2, it currently
triggers three times for each parameter.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/78147] The -Wshadow warning is too aggressive with constructor parameters
       [not found] <bug-78147-4@http.gcc.gnu.org/bugzilla/>
  2020-07-31 23:30 ` [Bug c++/78147] The -Wshadow warning is too aggressive with constructor parameters tilkax at gmail dot com
@ 2022-02-04 11:14 ` redi at gcc dot gnu.org
  2022-12-15 16:41 ` psmith at gnu dot org
  2024-04-08 20:40 ` dan.raviv at gmail dot com
  3 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2022-02-04 11:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78147

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Tillmann Karras from comment #5)
> This warning is useful, but as was pointed out in comment #2, it currently
> triggers three times for each parameter.

That's a separate issue, now reported as PR 104379

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/78147] The -Wshadow warning is too aggressive with constructor parameters
       [not found] <bug-78147-4@http.gcc.gnu.org/bugzilla/>
  2020-07-31 23:30 ` [Bug c++/78147] The -Wshadow warning is too aggressive with constructor parameters tilkax at gmail dot com
  2022-02-04 11:14 ` redi at gcc dot gnu.org
@ 2022-12-15 16:41 ` psmith at gnu dot org
  2024-04-08 20:40 ` dan.raviv at gmail dot com
  3 siblings, 0 replies; 4+ messages in thread
From: psmith at gnu dot org @ 2022-12-15 16:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78147

--- Comment #7 from Paul Smith <psmith at gnu dot org> ---
I don't really think this change is related to -Wunused-private-field: at least
I don't see any relationship.

My personal preference would be to not even bother to create an option for
this; I think that GCC should _never_ warn about this usage.  I really can't
fathom a reason that anyone would want to enable shadow warnings in this
situation, such that creating a separate option to control it worth the effort.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/78147] The -Wshadow warning is too aggressive with constructor parameters
       [not found] <bug-78147-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2022-12-15 16:41 ` psmith at gnu dot org
@ 2024-04-08 20:40 ` dan.raviv at gmail dot com
  3 siblings, 0 replies; 4+ messages in thread
From: dan.raviv at gmail dot com @ 2024-04-08 20:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78147

Dan Raviv <dan.raviv at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dan.raviv at gmail dot com

--- Comment #8 from Dan Raviv <dan.raviv at gmail dot com> ---
+1, agreed too aggressive.

Clang provides
https://clang.llvm.org/docs/DiagnosticsReference.html#wshadow-field-in-constructor

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-08 20:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-78147-4@http.gcc.gnu.org/bugzilla/>
2020-07-31 23:30 ` [Bug c++/78147] The -Wshadow warning is too aggressive with constructor parameters tilkax at gmail dot com
2022-02-04 11:14 ` redi at gcc dot gnu.org
2022-12-15 16:41 ` psmith at gnu dot org
2024-04-08 20:40 ` dan.raviv at gmail dot com

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).