Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: e050064b67c501e9fdc7bc3f513ba2b8b9e795f8 https://github.com/Perl/perl5/commit/e050064b67c501e9fdc7bc3f513ba2b8b9e795f8 Author: David Mitchell <da...@iabyn.com> Date: 2020-10-30 (Fri, 30 Oct 2020)
Changed paths: M op.c Log Message: ----------- Perl_custom_op_get_field(): remove undef behaviour Thus function has a couple a switches with default: NOT_REACHED; /* NOTREACHED */ but clang is complaining that the value returned by the function is undefined if those default branches are taken, since the 'any' variable doesn't get set in that path. Replace the NOTREACHED with a croak("panic: ..."). It's possible (albeit not intended) for Perl_custom_op_get_field() to be called with a 'field' arg which triggers the default case. So if this ever happens, make it clear that something has gone wrong, rather than just silently continuing on non-debugging builds. In any case, this shuts up clang.