[Issue 23690] compilable/cimports2.i:1:1: error: unknown type name '__import'

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 12 14:52:55 UTC 2023


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

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Another failing test in compilable/cimport.c

compilable/cimport.c:3:1: error: unknown type name ‘__import’
    3 | __import core.stdc.stdarg;
      | ^~~~~~~~
compilable/cimport.c:3:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘.’ token
    3 | __import core.stdc.stdarg;
      |              ^
compilable/cimport.c:4:1: error: unknown type name ‘__import’
    4 | __import imports.impcimport;
      | ^~~~~~~~
compilable/cimport.c:4:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘.’ token
    4 | __import imports.impcimport;
      |                 ^
compilable/cimport.c: In function ‘foo’:
compilable/cimport.c:8:5: error: unknown type name ‘va_list’
    8 |     va_list x;
      |     ^~~~~~~
compilable/cimport.c:1:1: note: ‘va_list’ is defined in header ‘<stdarg.h>’;
did you forget to ‘#include <stdarg.h>’?
  +++ |+#include <stdarg.h>
    1 | // https://issues.dlang.org/show_bug.cgi?id=22666
compilable/cimport.c:9:16: error: ‘A’ undeclared (first use in this function)
    9 |     return 1 + A;
      |                ^
compilable/cimport.c:9:16: note: each undeclared identifier is reported only
once for each function it appears in


Original test content:
```
// https://issues.dlang.org/show_bug.cgi?id=22666

__import core.stdc.stdarg;
__import imports.impcimport;

int foo()
{
    va_list x;
    return 1 + A;
}
```

--


More information about the Digitalmars-d-bugs mailing list