[Bug c++/71537] GCC rejects consetxpr boolean conversions and comparisons on the result of pointer arithmetic.

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 11 20:11:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71537

--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Jan 11 20:10:36 2017
New Revision: 244333

URL: https://gcc.gnu.org/viewcvs?rev=244333&root=gcc&view=rev
Log:
        PR c++/71537
        * fold-const.c (maybe_nonzero_address): Return 1 for function
        local objects.
        (tree_single_nonzero_warnv_p): Don't handle function local objects
        here.

        * g++.dg/cpp1y/constexpr-71537.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-71537.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list