Summary: Segfault combining std.c.linux and passing a ref
           Product: D
           Version: 2.030
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD

In the code below the compiler will "Segmentation fault." getopt takes a
string[], but is being given just a string. With the included import to
std.c.linux.linux DMD will end with a segfault rather than the appropriate
error message. Removing the import works as expected.

import std.c.linux.linux;
import std.getopt;

string arg1;

void main(string[] args) {


void parseArgs(ref string args) {
    getopt(args, "f|file", &arg1);

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to