This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/65075] New: [5 Regression] constexpr regression
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Feb 2015 00:34:44 +0000
- Subject: [Bug c++/65075] New: [5 Regression] constexpr regression
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65075
Bug ID: 65075
Summary: [5 Regression] constexpr regression
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
typedef void (*E) ();
template <class T>
constexpr E
bar ()
{
return []() {};
}
void
foo ()
{
(bar<int> ()) ();
}
is rejected since r215954 aka PR55250 with -std=c++11:
error: body of constexpr function âconstexpr void (* bar())() [with T = int; E
= void (*)()]â not a return-statement
The body is a return statement, just perhaps with some extra artificial
statements created for the lambda.