dmd -betterC

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 22 01:21:59 PDT 2017


On 2017-06-21 09:28, Walter Bright wrote:

> It does work with C on Windows, Linux, OSX, and FreeBSD, and so it works 
> with -betterC, too.

For example, in C there's "__thread" and in C++ there's "thread_local". 
"__thread" doesn't work with all C++ types because it may contain a 
non-trivial default constructor. For C++ types "thread_local" needs to 
be used which I believe requires some help from the runtime.

Does D have any of the those problems? I know it doesn't support default 
constructors but are there issues with other types, i.e. that would 
require support from the D runtime and not just the C runtime?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list