This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/80806] gcc does not warn if local array is memset only
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 11 Aug 2017 20:46:28 +0000
- Subject: [Bug c/80806] gcc does not warn if local array is memset only
- Auto-submitted: auto-generated
- References: <bug-80806-4@http.gcc.gnu.org/bugzilla/>
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.