[LLVMbugs] [Bug 17247] Macros with block extension in emmintrin.h generate warnings with -Wshadow

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 24 00:52:03 PDT 2013


jonathan.sauer at gmx.de changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |jonathan.sauer at gmx.de
         Resolution|---                         |DUPLICATE

--- Comment #1 from jonathan.sauer at gmx.de ---
Short version: Duplicate of Bug 16093.

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: Bug 16093 (which mentions emmintrin.h).

*** This bug has been marked as a duplicate of bug 16093 ***

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/20130924/a7185f8d/attachment.html>

More information about the llvm-bugs mailing list