This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH][Middle-end][version 2]change char type to unsigned char type when expanding strcmp/strncmp
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Qing Zhao <qing dot zhao at oracle dot com>
- Cc: gcc Patches <gcc-patches at gcc dot gnu dot org>, jeff Law <law at redhat dot com>, richard Biener <rguenther at suse dot de>
- Date: Fri, 20 Jul 2018 16:59:09 +0200
- Subject: Re: [PATCH][Middle-end][version 2]change char type to unsigned char type when expanding strcmp/strncmp
- References: <F0A510E7-248E-4EAF-81D4-1688B8C947B6@oracle.com> <20180719173100.GU7166@tucnak> <064067CF-7097-4EE3-BBD1-D44B2A8C6369@oracle.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jul 20, 2018 at 09:53:24AM -0500, Qing Zhao wrote:
> +2018-07-20 Qing Zhao <firstname.lastname@example.org>
> + * builtins.c (expand_builtin_memcmp): Delete the last parameter for
> + call to inline_expand_builtin_string_cmp.
> + (expand_builtin_strcmp): Likewise.
> + (expand_builtin_strncmp): Likewise.
> + (inline_string_cmp): Delete the last parameter, change char_type_node
> + to unsigned_char_type_node for strcmp/strncmp, add conversions to the
> + two operands.
> + (inline_expand_builtin_string_cmp): Delete the last parameter, give up
> + the inlining expansion on target where the type of the call has same or
> + narrower presicion than unsigned char.
Also in the patch, where there is another typo, s/of/or/.
Ok for trunk with that fixed.