[Issue 23697] compilable/test22705.c:4:1: error: unknown type name ‘Ta’

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 20 11:01:11 UTC 2023


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

Iain Buclaw <ibuclaw at gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw at gdcproject.org

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject.org> ---
(In reply to Walter Bright from comment #1)
> ImportC, as an extension, allows forward referencing. As it relies on D for
> the semantic analysis, this is natural. It doesn't cause any harm, though.
> 
> I recommend gcc just ignore this test.
The point is just to identify where we're deviating from standard C.  Because
if we're not testing ImportC against actual C code, how can we call it a C
compiler?

I think having an example of such forward reference on the documentation page
would be enough to satisfy this isssue:

https://dlang.org/spec/importc.html#forward-references

Just give friendly names to the first example in this issue.
```
Ta *pa;
struct Sa { int x; };
typedef struct Sa Ta;
```

--


More information about the Digitalmars-d-bugs mailing list