This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/83835] [7/8 Regression] constexpr constructor rejected in c++17 mode (regression WRT c++14)
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Jan 2018 21:05:11 +0000
- Subject: [Bug c++/83835] [7/8 Regression] constexpr constructor rejected in c++17 mode (regression WRT c++14)
- Auto-submitted: auto-generated
- References: <bug-83835-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83835
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Perhaps we also want to set TARGET_EXPR_DIRECT_INIT_P here:
6785 /* If this is a constructor or a function returning an aggr type,
6786 we need to build up a TARGET_EXPR. */
6787 if (DECL_CONSTRUCTOR_P (convfn))
6788 {
6789 expr = build_cplus_new (totype, expr, complain);
6790
6791 /* Remember that this was list-initialization. */
6792 if (convs->check_narrowing && expr != error_mark_node)
6793 TARGET_EXPR_LIST_INIT_P (expr) = true;
6794 }