On 21 April 2012 03:05, Michel Fortin <[email protected]> wrote:

> If you're trying to make a C-like global, write this:
>
>        static __gshared int x;
>

dlang.org seems to disagree:
"__gshared may also be applied to member variables and local variables. In
these cases, *__gshared is equivalent to static*, except that the variable
is shared by all threads rather than being thread local."
Suggests to me that you are not required to state both.

So which is correct?
It appears most people are confused about this. I'm thinking more and more
it's worth addressing that confusion with some warnings/errors.

Reply via email to