Bug 21750 – -betterC undefined reference to _memsetn

Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-03-23T18:11:15Z
Last change time
2022-02-10T13:42:20Z
Keywords
betterC
Assigned to
No Owner
Creator
ryuukk_
Blocks
19946

Comments

Comment #0 by ryuukk.dev — 2021-03-23T18:11:15Z
The following code produces: onlineapp.d:15: error: undefined reference to '_memsetn' collect2: error: ld returned 1 exit status Error: linker exited with status 1 Only happen in with DMD -betterC, with LDC it compiles fine Also on a more complex code base i get the following: Error: `TypeInfo` cannot be used with -betterC When creating a static array as local variable ``` struct Mat4 { float a; } struct Test { char[64] a = 0; Mat4 b; } extern (C) int main() { Test[1] test; return 0; } ```
Comment #1 by n8sh.secondary — 2021-03-23T22:17:12Z
This is a proper subset of issue 19946.
Comment #2 by snarwin+bugzilla — 2022-02-10T13:42:20Z
*** This issue has been marked as a duplicate of issue 19946 ***