This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/65398] [5 Regression] [C++11] GCC rejects constexpr variable definitions with valid initialization


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

--- Comment #11 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Mon Mar 30 18:39:17 2015
New Revision: 221777

URL: https://gcc.gnu.org/viewcvs?rev=221777&root=gcc&view=rev
Log:
    PR c++/65398
    * constexpr.c (cxx_fold_indirect_ref): Don't perform the
     *(&A[i] p+ j) => A[i + j] transformation here.
    (cxx_eval_pointer_plus_expression): New function.
    (cxx_eval_constant_expression): Use it here.

    * g++.dg/cpp0x/pr65398-2.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/pr65398-2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]