https://bugs.llvm.org/show_bug.cgi?id=47216
Bug ID: 47216
Summary: Ternary operator with vector does not work with Apple
Clang
Product: clang
Version: 10.0
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++17
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Created attachment 23857
--> https://bugs.llvm.org/attachment.cgi?id=23857&action=edit
clang-ternary-vector-bug.cc
Hi,
Ternary operator with vector does not work with Apple Clang:
bitmac-mini:tmp abique$ clang++ -std=c++17 clang-ternary-vector-bug.cc
test.cc:10:11: error: value of type '__attribute__((__vector_size__(4 *
sizeof(int)))) int' (vector of 4 'int' values) is not contextually convertible
to 'bool'
vec r = a < b ? a : b;
^~~~~
1 error generated.
bitmac-mini:tmp abique$ clang++ --version
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
This works windows and linux.
Regards,
Alexandre
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs