March 26, 2024
https://issues.dlang.org/show_bug.cgi?id=24435

--- Comment #1 from Lance Bachmeier <lance@lancebachmeier.com> ---
This is a preprocessor problem with the typedef. The following works:

structdef.c

typedef struct foo_ {
        int a;
        double b;
} foo;

structtest.c

#include <stdio.h>
#include <stdlib.h>

__import structdef;

int main() {
        int * x = (int *) malloc(2*sizeof(int));
        x[0] = 1;
        x[1] = 2;
        printf("%d\n", x[0]);
        printf("%d\n", x[1]);

        // Works
        foo * y = (struct foo_ *) malloc(sizeof(foo));
        // Fails to compile because it's imported and typedef'd
        foo * y = (foo *) malloc(sizeof(foo));
}

--
December 13
https://issues.dlang.org/show_bug.cgi?id=24435

--- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/18220

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--