https://issues.dlang.org/show_bug.cgi?id=15053
Issue ID: 15053
Summary: Runtime.cArgs not @nogc
Product: D
Version: D2
Hardware: x86_64
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: druntime
Assignee: [email protected]
Reporter: [email protected]
When using @nogc code and/or C standard library functions, accessing the
standard C main arguments is useful. Unfortunately, cArgs is not @nogc:
---
import core.stdc.stdio;
import core.runtime;
@nogc:
void main()
{
// NG
printf("%s\n", Runtime.cArgs.argv[0]);
}
---
--