<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:jonathan.sauer@gmx.de" title="jonathan.sauer@gmx.de">jonathan.sauer@gmx.de</a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED DUPLICATE - Macros with block extension in emmintrin.h generate warnings with -Wshadow"
href="http://llvm.org/bugs/show_bug.cgi?id=17247">bug 17247</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>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>jonathan.sauer@gmx.de
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>DUPLICATE
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED DUPLICATE - Macros with block extension in emmintrin.h generate warnings with -Wshadow"
href="http://llvm.org/bugs/show_bug.cgi?id=17247#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED DUPLICATE - Macros with block extension in emmintrin.h generate warnings with -Wshadow"
href="http://llvm.org/bugs/show_bug.cgi?id=17247">bug 17247</a>
from <span class="vcard"><a class="email" href="mailto:jonathan.sauer@gmx.de" title="jonathan.sauer@gmx.de">jonathan.sauer@gmx.de</a>
</span></b>
<pre>Short version: Duplicate of <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - -Wshadow not suppressed in Macro defined in system header"
href="show_bug.cgi?id=16093">Bug 16093</a>.
Long version:
The same thing happens with _mm_shuffle_ps (SSE), _mm_shuffle_pd (SSE2),
_mm_shuffle_epi32 (SSE2) etc, basically all those intrinsics implemented as a
macro plus block extension:
int main()
{
__m128i a = { 0 };
__m128i b = _mm_slli_si128(_mm_slli_si128(a, 0), 0);
}
I'm not sure the block extension is actually needed in these cases, as the
parameter <a> is only evaluated once. So it should be sufficient to say:
#define _mm_slli_si128(a, count) ( \
(__m128i)__builtin_ia32_pslldqi128((__m128i) (a), (count)*8))
However the main problem is that as of r191183 warnings about shadowed
variables that result from the expansion of macros defined in system headers
are not suppressed: <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - -Wshadow not suppressed in Macro defined in system header"
href="show_bug.cgi?id=16093">Bug 16093</a> (which mentions emmintrin.h).
*** This bug has been marked as a duplicate of <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - -Wshadow not suppressed in Macro defined in system header"
href="show_bug.cgi?id=16093">bug 16093</a> ***</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>