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

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Sep 15 07:20:13 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17247

            Bug ID: 17247
           Summary: Macros with block extension in emmintrin.h generate
                    warnings with -Wshadow
           Product: clang
           Version: 3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: loufoque at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11201
  --> http://llvm.org/bugs/attachment.cgi?id=11201&action=edit
demonstrates warning with emmintrin.h, compile with -Wshadow, can only be build
on a target with SSE2

The attached code generates warnings when compiled with -Wshadow because of
macro definitions like this:

#define _mm_srli_si128(a, count) __extension__ ({ \
  __m128i __a = (a); \
  (__m128i)__builtin_ia32_psrldqi128(__a, (count)*8); })

This sort of code can lead to -Wshadow warnings on __a when several macros like
this are called in a nested context, like the attached code.

Either the block extension needs to be modified to not emit -Wshadow warnings,
or the emmintrin.h file needs to locally disable that warning.

-- 
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/20130915/f9cf0f74/attachment.html>


More information about the llvm-bugs mailing list