https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86678
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86678
--- Comment #2 from Eric Fiselier ---
This is a bug according to [expr.const]p2 which states:
> An expression e is a core constant expression unless the evaluation of e,
> following the rules of the abstract machine, would evaluate one of the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86678
--- Comment #3 from Eric Fiselier ---
The `if (1)` isn't essential either.
void fail();
template
constexpr int foo() {
if (sizeof(T))
return 1;
fail();
}
constexpr int x = foo();
It seems to have something to do with whether
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86678
Jonathan Wakely changed:
What|Removed |Added
Last reconfirmed|2018-07-26 00:00:00 |2018-8-14
--- Comment #4 from Jonathan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86678
Jason Merrill changed:
What|Removed |Added
Status|NEW |ASSIGNED
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86678
--- Comment #5 from Jason Merrill ---
Author: jason
Date: Sat Sep 8 16:00:02 2018
New Revision: 264171
URL: https://gcc.gnu.org/viewcvs?rev=264171&root=gcc&view=rev
Log:
PR c++/86678 - constexpr function with non-constant after return.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86678
Jason Merrill changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86678
--- Comment #8 from Jonathan Wakely ---
(In reply to Ville Voutilainen from comment #7)
> *** Bug 67026 has been marked as a duplicate of this bug. ***
Confirmed, it was fixed by r264171 for PR 67026.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86678
Ville Voutilainen changed:
What|Removed |Added
CC||anders.granlund.0 at gmail dot
com