https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124905

--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Andreas Schwab from comment #4)
> The implementation shall behave as if it reads the characters sequentially
> and stops as soon as a matching character is found.

And in different words (
https://en.cppreference.com/w/c/string/byte/memchr.html ):
...
if the array pointed to by ptr is smaller than count, but the match is found
within the array, the behavior is well-defined. 
...

Reply via email to