[Bug c/92718] New: Bogus Wstringop-overflow in __builtin_memset() of an element of array of size 1 of struct

2019-11-28 Thread rlibby at gmail dot com
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: rlibby at gmail dot com Target Milestone: --- Created attachment 47392 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47392&action=edit Minimized te

[Bug middle-end/92718] [8/9/10 Regression] Bogus Wstringop-overflow in __builtin_memset() of an element of array of size 1 of struct

2019-11-30 Thread rlibby at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92718 --- Comment #3 from Ryan Libby --- (In reply to Martin Sebor from comment #2) > 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