<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [MS] #pragma vtordisp inside functions is not allowed"
href="https://llvm.org/bugs/show_bug.cgi?id=25013">25013</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[MS] #pragma vtordisp inside functions is not allowed
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>d.zobnin.bugzilla@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Clang fails to compile the following test, while MSVC compiles it without any
diagnostics:
$ cat 1.cpp
struct A {
virtual ~A() {};
virtual void foo() {};
int a;
};
template <class T> struct B : virtual A {
virtual ~B() {};
virtual void bar() {};
int b;
};
int main() {
#pragma vtordisp(push, 2)
B<int> obj;
#pragma vtordisp(pop)
return 0;
}
$ clang 1.cpp
1.cpp:14:11: error: expected expression
#pragma vtordisp(push, 2)
^
1.cpp:16:11: error: expected expression
#pragma vtordisp(pop)
^
2 errors generated.
Denis Zobnin
================
Software Engineer
Intel Compiler Team
Intel</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>