Extern/scope issue

rikki cattermole rikki at cattermole.co.nz
Sat Apr 3 10:21:58 UTC 2021


On 03/04/2021 11:17 PM, DLearner wrote:
> On Saturday, 3 April 2021 at 10:05:45 UTC, rikki cattermole wrote:
>> On 03/04/2021 11:01 PM, DLearner wrote:
>>> [...]
>>
>> TLS variable with D mangling, not a c global.
>>
>>>  [...]
>>
>> That is a regular variable.
>> Setting the calling convention/mangling like that doesn't make any 
>> sense and shouldn't be allowed in context.
>>
>>> [...]
> 
>> TLS variable with D mangling, not a c global.
> Does this mean D has no equivalent of C globals?
> What is the D way of doing this?

https://dlang.org/spec/attribute.html#gshared

However, you should be using the module system for accessing globals, 
rather than redeclaring them.


More information about the Digitalmars-d-learn mailing list