[llvm-bugs] [Bug 47216] New: Ternary operator with vector does not work with Apple Clang
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Aug 18 00:36:42 PDT 2020
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: unassignedclangbugs at nondot.org
Reporter: bique.alexandre at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200818/341bec51/attachment.html>
More information about the llvm-bugs
mailing list