On Saturday, 2 December 2023 at 05:16:43 UTC, name wrote:
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;
        // ...
}
```

It doesn't show up since it's defined as an Identifier Expression which cannot be resolved.

Reply via email to