This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71537] GCC rejects consetxpr boolean conversions and comparisons on the result of pointer arithmetic.
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Dec 2016 09:24:23 +0000
- Subject: [Bug c++/71537] GCC rejects consetxpr boolean conversions and comparisons on the result of pointer arithmetic.
- Auto-submitted: auto-generated
- References: <bug-71537-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71537
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Dec 6 09:23:51 2016
New Revision: 243285
URL: https://gcc.gnu.org/viewcvs?rev=243285&root=gcc&view=rev
Log:
2016-12-06 Jakub Jelinek <jakub@redhat.com>
PR c++/71537
* fold-const-call.c (fold_const_call_1): Remove memchr handling here.
(fold_const_call) <case CFN_BUILT_IN_STRNCMP,
case CFN_BUILT_IN_STRNCASECMP>: Formatting improvements.
(fold_const_call) <case CFN_BUILT_IN_MEMCMP>: Likewise. If s2 is 0
and arguments have no side-effects, return 0.
(fold_const_call): Handle CFN_BUILT_IN_MEMCHR.
* g++.dg/cpp0x/constexpr-memchr.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-memchr.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const-call.c
trunk/gcc/testsuite/ChangeLog