Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong codegen for array of anonymous structs #351

Open
denizzzka opened this issue Jun 28, 2024 · 0 comments
Open

Wrong codegen for array of anonymous structs #351

denizzzka opened this issue Jun 28, 2024 · 0 comments

Comments

@denizzzka
Copy link

denizzzka commented Jun 28, 2024

On current ~master

C code:

static struct {
  const char *name;
} http_strerror_tab[] = {
  { "CB_message_begin" },
  { "CB_url" },
  { "CB_header_field" }
};

Will be translated into D code:

extern(C)
{

    extern __gshared _Anonymous_0[3] http_strerror_tab;
}

Compiler says on this module:

$ ldc2 -c test2.d
test2.d(56): Error: undefined identifier `_Anonymous_0`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant