Anastasia added inline comments.

================
Comment at: test/SemaOpenCL/atomic-init.cl:6
+kernel void test_atomic_initialization() {
+  a1 = 1; // expected-error {{atomic variable can only be assigned to a 
compile time constant}}
+  atomic_int a2 = 0; // expected-error {{atomic variable can be initialized to 
a variable only in global address space}}
----------------
This diagnostic seems wrong! How is 1 not a compile time constant?

Didn't we agree to drop the constant bit from the error message and just keep 
reporting about the program (global visibility) scope? I think the restriction 
about the scope holds for both initialization and assignment and therefore I 
have asked to unify the diagnostic...


https://reviews.llvm.org/D30643



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

Reply via email to