[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug c/97398] Enhancement request: Warning when multiply assigning to same struct field
From:       "egallager at gcc dot gnu.org via Gcc-bugs" <gcc-bugs () gcc ! gnu ! org>
Date:       2022-12-30 2:57:01
Message-ID: bug-97398-4-vqjfSNxJC7 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

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

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |89180, 87403

--- Comment #4 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Ulrich Windl from comment #3)
> (In reply to Eric Gallager from comment #2)
> > would this go under one of the existing -Wunused flags, or a new one?
> 
> I think it's a case of being an unused value set to a variable in general,
> but more specifically it's setting a value more than once before possibly
> being used (which is the case in my code).  SO IMHO the question is whether
> setting a variable more than once without being read in between is a special
> case of setting a variable value without using it.

Hm... guess I'll put this under both the "Wunused" and "new-warning" meta-bugs,
and then let whoever implements it decide where it fits better...


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87403
[Bug 87403] [Meta-bug] Issues that suggest a new warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89180
[Bug 89180] [meta-bug] bogus/missing -Wunused warnings=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic