ImportC: Windows.h

name n at m.e
Sat Dec 2 05:16:43 UTC 2023


Minimum thing to reproduce bug:

main.d:
```d
import test;

void main() {
   auto a = FILE_MAP_READ;
}
```

test.c
```c
#define SECTION_MAP_READ  0x0004
#define FILE_MAP_READ     SECTION_MAP_READ
```

build with ```"D:\dmd.2.105.3.windows\dmd2\windows\bin64\dmd.exe" 
-c test.c -vcg-ast```.

test.c.cg (```FILE_MAP_READ``` doesn't show up):
```d
extern (C)
{
	enum int __IMPORTC__ = 1;
	enum int _M_X64 = 100;
	enum int _MSC_EXTENSIONS = 1;
	enum int _MSC_BUILD = 0;
	enum int _WIN64 = 1;
         // ...
	enum int SECTION_MAP_READ = 4;
         // ...
}
```



More information about the Digitalmars-d-learn mailing list