Messages in this thread | | | Date | Fri, 2 Aug 2013 00:42:48 +0400 | Subject | Re: [PATCH] tile: optimize strnlen using SIMD instructions | From | Max Filippov <> |
| |
Hi Ken,
On Thu, Aug 1, 2013 at 11:55 PM, Ken Steele <ken@tilera.com> wrote: > + /* Read the first word, but force bytes before the string to be nonzero. > + * This expression works because we know shift counts are taken mod 32. > + */ > + v = *p | ((1 << (s_int << 3)) - 1);
This expression potentially has undefined behaviour according to C99, 6.5.7:3. IOW it may work, but it doesn't always have to.
-- Thanks. -- Max
| |