tra requested changes to this revision. tra added a comment. This revision now requires changes to proceed.
NVCC is not always right. > Is there a specific use case for this, other than matching nvcc bug-for-bug? I don't think I've seen the answer to my question above. > However, user can turn it into a warning by -Wno-error=cuda-shared-init. I believe that producing the error by default is the correct thing to do for correctness sake. Your example on godbolt illustrates it quite clearly -- there is no initialization done whatsoever, which is contrary to what the written code intended to do. I am strongly against turning this into a warning by default. If there's specific *need* for making it a warning in some cases, we can consider adding an *option* to make it a warning. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59647/new/ https://reviews.llvm.org/D59647 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits