https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122333
Bug ID: 122333
Summary: Build warning m2spellcheck.cc with memset
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: modula2
Assignee: gaius at gcc dot gnu.org
Reporter: gaius at gcc dot gnu.org
Target Milestone: ---
../../gcc/m2/gm2-gcc/m2spellcheck.cc: In function ‘void*
m2spellcheck_InitCandidates()’:
../../gcc/m2/gm2-gcc/m2spellcheck.cc:60:10: warning: ‘void* memset(void*, int,
size_t)’ clearing an object of type ‘Candidates’ {aka ‘struct Candidates_t’}
with no trivial copy-assignment; use value-initialization instead
[-Wclass-memaccess]
60 | memset (c, 0, sizeof (Candidates));
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/m2/gm2-gcc/m2spellcheck.cc:38:16: note: ‘Candidates’ {aka ‘struct
Candidates_t’} declared here
38 | typedef struct Candidates_t {
| ^~~~~~~~~~~~