<html>
<head>
<base href="http://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-abi] Clang doesn't treat declspec on record declarations correctly"
href="http://llvm.org/bugs/show_bug.cgi?id=18126">18126</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[ms-abi] Clang doesn't treat declspec on record declarations correctly
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>whunt@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>cl appears to ignore __declspec(align) on record declarations and clang-cl does
not.
cl allows conflicting __declspec(dllimport/export) attributes on the
declaration and definition with the definition attribute taking precedence.
clang warns on __declspec(dllexport) either place:
warning: 'dllexport' attribute only applies to variables and functions
[-Wignored-attributes]
In my test:
struct S;
struct __declspec(dllimport) S {
static void f() {}
} a;
int main() {
S a;
a.f();
printf("align : %d %d\n", __alignof(S), __alignof(a));
}
dllimport seems to have no impact whatsoever in clang. In cl, dllimport
suppresses export of f.</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>