[LLVMbugs] [Bug 12736] New: -fms-compatibility results in compile errors when including <emmintrin.h>
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu May 3 21:21:14 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12736
Bug #: 12736
Summary: -fms-compatibility results in compile errors when
including <emmintrin.h>
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Headers
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: louismichaelhowe at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Test which demonstrates this, using clang version 3.2 (trunk 156145)
--------
cat > test-emmintrin.c << EOF
#include <emmintrin.h>
EOF
clang -c test-emmintrin.c -fms-compatibility -msse2
--------
... results in errors like this:
--------
/opt/clang-3.2svn/bin/../lib/clang/3.2/include/emmintrin.h:134:20: error:
invalid conversion between vector type '__v4si' and scalar type '__m128d'
(aka 'double')
return (__m128d)((__v4si)a & (__v4si)b);
^~~~~~~~~
--------
>From <emmintrin.h>:
>> typedef double __m128d __attribute__((__vector_size__(16)));
It looks like newer versions of Clang ignore gcc-style vector attributes when
using the -fms-compatibility flag. This very well might be the intended
behavior - but it seems like such a simple test case shouldn't fail to compile.
This behavior doesn't occur with clang version 3.1 (trunk 145140).
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list