| |
| Posted by Steven Schveighoffer in reply to test123 | PermalinkReply |
|
Steven Schveighoffer
Posted in reply to test123
| On Saturday, 24 September 2022 at 06:13:55 UTC, test123 wrote:
> If so please report it for me to bugs platform. I can not register one.
package {
version(TEST) {
static:
} else {
__gshared:
}
uint test = 0;
}
ldmd2 -betterC -vtls -c ./test.d
./test.d(7): test is thread local
static does nothing to module level variables.
Without attributes, test will be thread local. Your attributes are having no effect on the variable because they don’t apply outside the braces.
-Steve
|