re PR c/84953 (misleading warning from strpbrk(x,""))
authorJakub Jelinek <jakub@redhat.com>
Tue, 20 Mar 2018 07:55:41 +0000 (08:55 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 20 Mar 2018 07:55:41 +0000 (08:55 +0100)
commita8ed1cbd67ebb44c14f65432524892b384ba11e9
tree7b0cddb9d6b428718734ecc904b047f3c7e35013
parentd2a1b11e65ed693af10ecae1b0c48b23e6e097fa
re PR c/84953 (misleading warning from strpbrk(x,""))

PR c/84953
* builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
instead of TREE_TYPE (s1) for the return value.

* gcc.dg/pr84953.c: New test.

From-SVN: r258671
gcc/ChangeLog
gcc/builtins.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr84953.c [new file with mode: 0644]