[Bug c/84953] misleading warning from strpbrk(x,"")
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 19 17:55:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84953
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/builtins.c.jj 2018-03-07 22:51:58.871478732 +0100
+++ gcc/builtins.c 2018-03-19 18:49:45.313898848 +0100
@@ -9573,7 +9573,7 @@ fold_builtin_strpbrk (location_t loc, tr
if (p2[0] == '\0')
/* strpbrk(x, "") == NULL.
Evaluate and ignore s1 in case it had side-effects. */
- return omit_one_operand_loc (loc, TREE_TYPE (s1), integer_zero_node,
s1);
+ return omit_one_operand_loc (loc, type, integer_zero_node, s1);
if (p2[1] != '\0')
return NULL_TREE; /* Really call strpbrk. */
More information about the Gcc-bugs
mailing list