This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/80806] gcc does not warn if local array is memset only


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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=44108

--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
My patch for this warning causes regressions in Wunused-var-8.c added for bug
44108.  As it turns out, GCC considers it a use of a variable even when it's
just mentioned in an unevaluated context (such as the sizeof expression in the
call to memset in comment #0), without being evaluated.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]