[llvm-bugs] [Bug 51324] New: Macros in Intel intrinsic headers missing enclosing parentheses
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Aug 3 07:23:19 PDT 2021
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: unassignedclangbugs at nondot.org
Reporter: ehandal at gmail.com
CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210803/4371cd3f/attachment.html>
More information about the llvm-bugs
mailing list