D as a Better C

Steven Schveighoffer via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed Aug 23 10:35:57 PDT 2017


On 8/23/17 11:56 AM, Walter Bright wrote:
> On 8/23/2017 7:10 AM, Steven Schveighoffer wrote:
>> Nope.
> 
> A ModuleInfo is generated, as well as FMB/FM/FME sections. Those 
> sections may not work with the C runtime.

My point was simply that your small example doesn't cause any runtime or 
link time errors. You need something more complicated to require betterC.

Not sure if ModuleInfo is generated. IIRC, Martin made it so it's not if 
no usage of the ModuleInfo is apparent.

Yes, adding a struct causes link errors, but not because of ModuleInfo, 
it's because of the expected TypeInfo.

-Steve


More information about the Digitalmars-d-announce mailing list