[Issue 13421] disallow __gshared members without static

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Sep 4 12:43:04 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13421

--- Comment #6 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
specs clearly says:

> __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.
http://dlang.org/attribute.html#gshared

so "static __gshared" is a tautology, and i believe that it should be error
instead of warning. but error'ing it can break some code, so let's warn for
now.

--


More information about the Digitalmars-d-bugs mailing list