[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 30 17:00:27 PDT 2016


jlebar added inline comments.


> tra wrote in DiagnosticSemaKinds.td:6727
> It's not clear whether you mean global storage class or global namespace.
> The code checks for global storage, but error message is could be interpreted either way, IMO.
> 
> I'll leave phrasing up to you.

> It's not clear whether you mean global storage class or global namespace.

So there's actually no such thing as "global" storage class.  It's *static* storage (so helpful), meaning, a global variable or a `static` variable inside of a function.

But `__constant__` symbols must actually be global variables -- nvcc doesn't allow them to appear inside function bodies.

I think "global" is the right way to describe what we're going after.  Until a Language Lawyer corrects me, anyway.  :)

https://reviews.llvm.org/D25129





More information about the cfe-commits mailing list