Anastasia added a comment.

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

> In D100980#2719322 <https://reviews.llvm.org/D100980#2719322>, @Anastasia 
> wrote:
>
>> In D100980#2719196 <https://reviews.llvm.org/D100980#2719196>, @azabaznov 
>> wrote:
>>
>>>> When the pragma is parsed we can't know why it is in the code to be able 
>>>> to issue any warning.
>>>
>>> I mean diagnose once when, for example in your particular case, double type 
>>> is parsed.  Does it require much effort? I think this warning might be 
>>> useful for developers who already rely on pragma usage in their kernels.
>>
>> I am not sure I understand your suggestion. Could you show an example 
>> perhaps?
>
> All right. Currently, what we do have for OpenCL C < 1.2  
> (https://godbolt.org/z/rjYWMj7v1):
>
>   <source>:6:5: error: use of type 'double' requires cl_khr_fp64 support
>       double d;
>       ^
>   1 error generated.
>
> What I suggest is to have:
>
>   <source>:6:5: warning: pragma enable is no longer required for use of type 
> 'double'
>       double d;
>       ^
>   1 warning generated.
>
> We can issue the warning if certain flag is provided for example. Does it 
> make sense?

Not sure what do we want to achieve with this? Do you want to point out that 
the code might be somehow less portable let's say between clang revisions, etc? 
I think we could do it as it should not be too complicated but adds a bit extra 
complexity into the command line interface.


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