<div class="gmail_quote">On 21 April 2012 03:05, Michel Fortin <span dir="ltr"><<a href="mailto:michel.fortin@michelf.com">michel.fortin@michelf.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">If you're trying to make a C-like global, write this:</div>
<br>
        static __gshared int x;<br></blockquote><div><br></div><div><a href="http://dlang.org">dlang.org</a> seems to disagree:</div><div>"__gshared may also be applied to member variables and local variables. In these cases, <b>__gshared is equivalent to static</b>, except that the variable is shared by all threads rather than being thread local."</div>
<div>Suggests to me that you are not required to state both.</div><div><br></div><div>So which is correct?</div><div>It appears most people are confused about this. I'm thinking more and more it's worth addressing that confusion with some warnings/errors.</div>
</div>