D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22927 - importC: 'struct already exists' with forward reference and function with same name
Summary: importC: 'struct already exists' with forward reference and function with sam...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: ImportC, pull
Depends on:
Blocks:
 
Reported: 2022-03-25 12:08 UTC by duser
Modified: 2022-03-31 08:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description duser 2022-03-25 12:08:10 UTC
struct block *tmp;
struct block {};
void block(void);
void block(void){}

test.c(2): Error: struct `test.block` already exists at test.c(1). Perhaps in another function with the same name?
Comment 1 Dlang Bot 2022-03-31 05:28:38 UTC
@WalterBright created dlang/dmd pull request #13931 "fix Issue 22927 - importC: 'struct already exists' with forward refer…" fixing this issue:

- fix Issue 22927 - importC: 'struct already exists' with forward reference and function with same name

https://github.com/dlang/dmd/pull/13931
Comment 2 Dlang Bot 2022-03-31 08:11:41 UTC
dlang/dmd pull request #13931 "fix Issue 22927 - importC: 'struct already exists' with forward refer…" was merged into master:

- 42047a8ba511e062f34429e1db7b191e64365d2f by Walter Bright:
  fix Issue 22927 - importC: 'struct already exists' with forward reference and function with same name

https://github.com/dlang/dmd/pull/13931