Anastasia added a comment.

In D100980#2711588 <https://reviews.llvm.org/D100980#2711588>, @azabaznov wrote:

>> do you think it is valuable to keep this behavior at all?
>
> As I said, I would be happy too if we remove pragma extension as it will 
> really simplify the codebase of OpenCL in clang and the usage of optional 
> functionality itself. Maybe we should add a diagnostic that pragma is ignored?

For `cl_khr_fp64` I still want to keep the pragma for the other use case - to 
convert double literal into single-precision 
(https://github.com/KhronosGroup/OpenCL-Docs/issues/578). The reason why I 
think it could be useful is that the precision change might lead to a different 
result depending on the precision of the calculation. So I think pragmas could 
be useful to control whether double literal is single-precision or not to avoid 
this problem occur when code is compiled for different targets?

When we parse the pragma we don't know what it is used for in the code so it 
won't be possible to emit the warning conditionally.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100980/new/

https://reviews.llvm.org/D100980

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to