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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
                 CC|                            |msebor at gcc dot gnu.org
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=36602
             Blocks|                            |88443

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Replacing the memset call with the assignment '*p = (struct s){ 0 };' avoids
the warning and also results in better/optimal code.  (As suggested in pr36602,
that would be a useful optimization independent of the warning.)


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443
[Bug 88443] [meta-bug] bogus/missing -Wstringop-overflow warnings

Reply via email to