This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/85689] New: if constexpr compiles false branch
- From: "msharov at users dot sourceforge.net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 07 May 2018 20:04:04 +0000
- Subject: [Bug c++/85689] New: if constexpr compiles false branch
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85689
Bug ID: 85689
Summary: if constexpr compiles false branch
Product: gcc
Version: 8.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: msharov at users dot sourceforge.net
Target Milestone: ---
int main (void)
{
if constexpr (false)
static_assert (false, "this should not be compiled");
return 0;
}
g++ 8.1 fails compiling the branch with the static_assert even though if
constexpr condition is false. May be the same as #85149, but still present in
g++ 8.1.0 on Arch.