[llvm-bugs] [Bug 37833] New: Abstract class in function return type
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jun 18 04:18:12 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37833
Bug ID: 37833
Summary: Abstract class in function return type
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: zhonghao at pku.org.cn
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
The code is as follow:
template<typename T>
struct S{};
struct A
{
virtual void f() = 0;
};
int main()
{
S<A(int)> s;
}
An abstract class shall not be used as a function return type, but clang++
accepts the code.
The code comes from a gcc bug report
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51184).
A previous version of gcc also accepts the code, but it is fixed already.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180618/2e650608/attachment.html>
More information about the llvm-bugs
mailing list