[Issue 24447] New: ImportC: extern symbols cannot have initializers
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Mar 21 22:32:16 UTC 2024
    
    
  
https://issues.dlang.org/show_bug.cgi?id=24447
          Issue ID: 24447
           Summary: ImportC: extern symbols cannot have initializers
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ImportC, rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dave287091 at gmail.com
The following C code is rejected:
```
extern int x = 3;
```
Error: variable `a.x` extern symbols cannot have initializers
As far as I can tell this is legal C, if unidiomatic.
--
    
    
More information about the Digitalmars-d-bugs
mailing list