On Mon, Jan 13, 2020 at 06:42:06PM -0500, David Malcolm wrote: > Thanks. Does it have warnings, though? > > My attempt was similar, but ran into warnings from -Wclass-memaccess in > four places, like this: > > ../../src/gcc/hash-map-traits.h:102:12: warning: ‘void* memset(void*, > int, size_t)’ clearing an object of type ‘struct hash_map<tree_node*, > std::pair<tree_node*, tree_node*> >::hash_entry’ with no trivial copy- > assignment; use assignment or value-initialization instead [-Wclass- > memaccess] > 102 | memset (entry, 0, sizeof (T) * count); > | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > where the types in question are: > > (1) > struct hash_map<tree_node*, std::pair<tree_node*, tree_node*> > >::hash_entry > ../../src/gcc/tree-data-ref.c:844:17: required from here
I don't understand how there could be new warnings. The patch doesn't add any new memsets, all it does is if (0) code in alloc_entries for certain traits and in empty_slow stops using memset for some traits and uses mark_empty loop there instead. This was non-bootstrapped build, but I didn't see new warnings in there, and for tree-data-ref.c which you've mentioned I've tried to compile with installed trunk compiler and didn't get any warnings either. Jakub