[Issue 20231] New: unable to resolve forward reference
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Sep 19 21:33:33 UTC 2019
    
    
  
https://issues.dlang.org/show_bug.cgi?id=20231
          Issue ID: 20231
           Summary: unable to resolve forward reference
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: major
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: cromfr at gmail.com
The following code does not compile on Windows x86:
```
import std.stdint;
enum Yolo: uint32_t {
    a = 42,
}
void main(){}
```
test.d(2): Error: enum `test.Yolo` unable to resolve forward reference in
definition
Compiling this code on Linux x86 / x86_64 works perfectly.
Yolo types uint32_t and int32_t cause the error, other types seems to work
fine.
Affected versions are from dmd 2.081 to 2.088.0. 2.080.1 is not affected.
I'd bet the issue is related to how uint32_t and int32_t are defined in
https://github.com/dlang/druntime/blob/master/src/core/stdc/stdint.d#L46
--
    
    
More information about the Digitalmars-d-bugs
mailing list