Skip to content

-fms-compatibility results in compile errors when including <emmintrin.h> #13108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
llvmbot opened this issue May 4, 2012 · 3 comments
Closed
Labels
bugzilla Issues migrated from bugzilla clang:headers Headers provided by Clang, e.g. for intrinsics worksforme Resolved as "works for me"

Comments

@llvmbot
Copy link
Member

llvmbot commented May 4, 2012

Bugzilla Link 12736
Resolution WORKSFORME
Resolved on Jul 09, 2013 13:36
Version trunk
OS All
Blocks llvm/llvm-bugzilla-archive#13707
Reporter LLVM Bugzilla Contributor
CC @AaronBallman,@tritao

Extended Description

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).

@tritao
Copy link
Mannequin

tritao mannequin commented Aug 27, 2012

I can't reproduce this. Is this still an issue for you?

@AaronBallman
Copy link
Collaborator

I cannot reproduce this issue either; if this is still reproducible, please let us know more about your setup.

@tritao
Copy link
Mannequin

tritao mannequin commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#13707

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
@Quuxplusone Quuxplusone added the worksforme Resolved as "works for me" label Jan 20, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:headers Headers provided by Clang, e.g. for intrinsics worksforme Resolved as "works for me"
Projects
None yet
Development

No branches or pull requests

3 participants