https://bugs.llvm.org/show_bug.cgi?id=48101

            Bug ID: 48101
           Summary: [C++] Use of vectors is ternary
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: OpenCL
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

This seems to be related to https://bugs.llvm.org/show_bug.cgi?id=33103 but
however it doesn't cover OpenCL code. The change can probably be done
uniformaly.

The main issue is that in C++ condition of ternary operators is contextually
converted to bool while in C they can be any scalar type. This seems to be an
issue because OpenCL doesn't have a bool type for vectors, but however booln is
a reserved identifier.

To allow this potentially some work is needed on the language side first i.e.
could we introduce booln type or could we convert vector types to bool? The
latter potentially means that the behavior between OpenCL C and C++ for OpenCL
is not strickly backward compatible.

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

Reply via email to