This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67592] New: A virtual member function declared constexpr fails to trigger a diagnostic
- From: "andrey.vul at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Sep 2015 18:06:22 +0000
- Subject: [Bug c++/67592] New: A virtual member function declared constexpr fails to trigger a diagnostic
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67592
Bug ID: 67592
Summary: A virtual member function declared constexpr fails to
trigger a diagnostic
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: andrey.vul at gmail dot com
Target Milestone: ---
The test case
// begin test.cc
struct S {
constexpr virtual int f() { return 1; }
};
// end test.cc
fails to emit a diagnostic with invocation
g++-6.0.0-alpha20150830 -std=c++11 -Wall -Wextra -pedantic test.cc
C++11 and C++14 [dcl.constexpr]p3.1 state that a constexpr function shall not
be virtual.