https://bugs.llvm.org/show_bug.cgi?id=51324
Bug ID: 51324
Summary: Macros in Intel intrinsic headers missing enclosing
parentheses
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Headers
Assignee: unassignedclangb...@nondot.org
Reporter: ehan...@gmail.com
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
I've seen macros like this in smmintrin.h and xmmintrin.h:
#define _mm_round_ps(X, M) \
(__m128)__builtin_ia32_roundps((__v4sf)(__m128)(X), (M))
Specifically, macros where the result is casted are missing parentheses
enclosing the cast, leading to unexpected behavior and compile errors if any
operators with higher precedence than the cast are used directly on the return
value.
It's possible more of the Intel intrinsic headers have this issue, but I only
checked the two headers above.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs