[Issue 22961] New: importC: K&R-style main function rejected

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 29 22:40:33 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=22961

          Issue ID: 22961
           Summary: importC: K&R-style main function rejected
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ImportC, rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: duser at neet.fi
                CC: duser at neet.fi

int main(argc, argv)
        int argc;
        char **argv;
{ 
        return 0;
}

test.c(4): Error: function `test.main` parameters must match one of the
following signatures
test.c(4):        `main()`
test.c(4):        `main(int argc, char** argv)`
test.c(4):        `main(int argc, char** argv, char** environ)` [POSIX
extension]

this used to work before the error was added in
https://github.com/dlang/dmd/pull/13749

--


More information about the Digitalmars-d-bugs mailing list