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++/50248] [C++0x] unnecessary instantiation of constexpr constructor


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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2011-09-05 04:33:14 UTC ---
Author: jason
Date: Mon Sep  5 04:33:08 2011
New Revision: 178518

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178518
Log:
    PR c++/50248
    Core 1358
    * init.c (perform_member_init): Don't diagnose missing inits here.
    (emit_mem_initializers): Or here.
    * method.c (process_subob_fn): Don't instantiate constexpr ctors.
    * semantics.c (cx_check_missing_mem_inits): New.
    (explain_invalid_constexpr_fn): Call it.
    (register_constexpr_fundef): Likewise.  Leave
    DECL_DECLARED_CONSTEXPR_P set when the body is unsuitable.
    (cxx_eval_call_expression): Adjust diagnostics.
    (cxx_eval_constant_expression): Catch use of 'this' in a constructor.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-template2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/init.c
    trunk/gcc/cp/method.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C


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