https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121201
Bug ID: 121201 Summary: genpreds uses deprecated rawmemchr, breaks build on musl based system Product: gcc Version: 16.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: dkm at gcc dot gnu.org Target Milestone: --- Since r16-2374-ga51c146ebce41b commit a51c146ebce41b5e4326b222f2d9e04bb22d276f Author: Stefan Schulze Frielinghaus <stefa...@gcc.gnu.org> Date: Mon Jul 21 13:05:26 2025 +0200 Hard register constraints There's: ``` puts (" default: break;\n" " }\n" " if (str[0] == '{')\n" " return ((const char *) rawmemchr (str + 1, '}') - str) + 1;\n" " return 1;\n" "}\n"); ``` rawmemchr is marked as deprecated on glibc and does not even exist on musl. A build on alpine linux gives: ``` In file included from ./tm_p.h:6, from build/gencondmd.cc:29: ./tm-preds.h: In function 'size_t insn_constraint_len(char, const char*)': ./tm-preds.h:432:30: error: 'rawmemchr' was not declared in this scope; did you mean 'wmemchr'? 432 | return ((const char *) rawmemchr (str + 1, '}') - str) + 1; | ^~~~~~~~~ | wmemchr make[2]: *** [Makefile:3204: build/gencondmd.o] Error 1 ```