This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
change HvENAME_HEK() to HvENAME_HEK_NN() where NULLs would crash anyway
gcc 12 was producing a confusing message complaining that
references to with hek_key[] were beyond the end of the array,
even though a properly HEK has bytes beyond the first we declare.
From experimentation I theorize the confusing message was produced
because HvENAME_HEK() can return a NULL pointer, and the array
pointed to by any NULL pointer is zero length, producing the
array bounds warning we were seeing.
Fixed by changing each hv_(fetch|delete)hek() call to use the
HvENAME_HEK_NN() macro variant, which doesn't include an explicit
NULL return value.
mro_method_changed_in() was a bit special, it evaluated the
hv_fetchhek() before the check for an anonymous stash, so I reordered
the code to take advantage of C99, checking the assertions before we
dereference the stash pointer, checking we have a name before trying
to look it up.