<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:ndesaulniers@google.com" title="Nick Desaulniers <ndesaulniers@google.com>"> <span class="fn">Nick Desaulniers</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - __attribute__((alias)) should prevent unused warnings"
href="https://bugs.llvm.org/show_bug.cgi?id=39088">bug 39088</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>RESOLVED
</td>
<td>REOPENED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>INVALID
</td>
<td>---
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - __attribute__((alias)) should prevent unused warnings"
href="https://bugs.llvm.org/show_bug.cgi?id=39088#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - __attribute__((alias)) should prevent unused warnings"
href="https://bugs.llvm.org/show_bug.cgi?id=39088">bug 39088</a>
from <span class="vcard"><a class="email" href="mailto:ndesaulniers@google.com" title="Nick Desaulniers <ndesaulniers@google.com>"> <span class="fn">Nick Desaulniers</span></a>
</span></b>
<pre>Reopening, there are simply too many drivers in the Linux kernel that trigger
this warning.
Ideas:
* make it so that attribute alias marks the referenced variable as used
(assuming the referenced one still gets cleaned up; we care about the alias,
not the original) or referenced.
* make it so that -Wunneeded-internal-declaration has a pedantic ExtWarn
version for this case? (eh, this doesn't sound as good on paper)
* ???
When in a local function, we could do something like `(void) foo;` to silence
these unused var warnings. Can't do that trick for globally defined variables,
but maybe there's something similar we can do.
The alias is created in a macro that's used pervasively, so adding something to
the macro is more feasible than adding __attribute__((unused)) to every macro
expansion site in the kernel.</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>