The attached patch is a first draft of an attempt to get rid of UB in src/string/* by using the may_alias attribute correctly conditional on __GNUC__. I've tried to structure it so that it's obvious there are no semantic changes in the __GNUC__ case (memchr.c had some slight structural changes, but the condition removed was already implied by the for loop conditions), which unfortunately leaves everything pretty ugly and with inconsistent style. We should probably pick some canonical, well-styled files, write the fully-general (byte-match && size-limit end conditions) versions of both search and copy, and then either write all the simpler versions in matching style, or write a pair of common templates that optimize-down to individual functions like strlen, stpcpy, etc. At least memmove needs to be done separately (it doesn't fit the pattern of the others), and there might be other omissions too. But this is at least a good starting point for review. Rich