[PATCH 2/3] Fold __builtin_memchr (version 2)
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Fri Oct 7 11:21:00 GMT 2016
Hi,
> -static int
> +int
> target_char_cast (tree cst, char *p)
> + if (target_char_cast (arg2, &c))
> + return false;
I believe target_char_cast is incorrect if the host/target chars are not identical
(depending on how constant strings are created there may be signed/unsigned
mismatches too). I recently added target_char_cst_p to gimple-fold.c to avoid
char representation mismatches, so it would be better to use that instead.
Wilco
More information about the Gcc-patches
mailing list