December 02

On Saturday, 2 December 2023 at 05:16:43 UTC, name wrote:

>

Minimum thing to reproduce bug:

main.d:

import test;

void main() {
  auto a = FILE_MAP_READ;
}

test.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):

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.

December 02

On Saturday, 2 December 2023 at 08:36:01 UTC, Stefan Koch wrote:

>

On Saturday, 2 December 2023 at 05:16:43 UTC, name wrote:

>

Minimum thing to reproduce bug:
[...]

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

But why can't it be resolved?

1 2
Next ›   Last »