Bug 23721 – runnable/test22513.c:18:28: error: field ‘t’ has incomplete type

Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2023-02-15T17:53:08Z
Last change time
2023-02-20T12:40:13Z
Keywords
accepts-invalid, ImportC
Assigned to
No Owner
Creator
Iain Buclaw
Depends on
23689
See also
https://issues.dlang.org/show_bug.cgi?id=23689

Comments

Comment #0 by ibuclaw — 2023-02-15T17:53:08Z
When compiling the test with `gcc -std=c11 -fsyntax-only` runnable/test22513.c:18:28: error: field ‘t’ has incomplete type 18 | struct S { int a; struct T t; }; | ^ Original test: ``` struct S { int a; struct T t; }; struct T { int b; int x; }; ```
Comment #1 by bugzilla — 2023-02-20T07:30:21Z
forward references allowed in ImportC
Comment #2 by ibuclaw — 2023-02-20T12:40:13Z
*** This issue has been marked as a duplicate of issue 23697 ***