[Bug c++/91705] [9 Regression] operator++ broken in constexpr floating point code

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 10 22:40:00 GMT 2019


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

--- Comment #11 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Tue Sep 10 22:39:46 2019
New Revision: 275615

URL: https://gcc.gnu.org/viewcvs?rev=275615&root=gcc&view=rev
Log:
        PR c++/91705 - constexpr evaluation rejects ++/-- on floats.
        * constexpr.c (cxx_eval_increment_expression): Call fold_simple on
        the offset.

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

Added:
    branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp1y/constexpr-incr2.C
Modified:
    branches/gcc-9-branch/gcc/cp/ChangeLog
    branches/gcc-9-branch/gcc/cp/constexpr.c


More information about the Gcc-bugs mailing list