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++/47207] [4.6 Regression] [C++0x] ICE: in decl_constant_var_p, at cp/decl2.c:3563 on invalid code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47207

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2011-02-21 15:35:52 UTC ---
Author: jason
Date: Mon Feb 21 15:35:44 2011
New Revision: 170365

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170365
Log:
    PR c++/47207
    * decl2.c (decl_constant_var_p): A constexpr var needs an
    initializer to be constant.
    * semantics.c (cxx_eval_constant_expression): Complain about
    constexpr var used in its own initializer.
    * call.c (set_up_extended_ref_temp): Set
    DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P too.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-diag2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/cp/decl2.c
    trunk/gcc/cp/semantics.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]