[Issue 23694] New: compilable/ctests2.c:51:9: error: initializer element is not constant
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sun Feb 12 14:57:10 UTC 2023
    
    
  
https://issues.dlang.org/show_bug.cgi?id=23694
          Issue ID: 23694
           Summary: compilable/ctests2.c:51:9: error: initializer element
                    is not constant
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org
When compiling the test with `gcc -std=c11 -fsyntax-only`
compilable/cppflags.c:4:16: error: ‘ABC’ undeclared here (not in a function)
    4 | _Static_assert(ABC == 3, "1");
      |                ^~~
compilable/cppflags.c:4:16: error: expression in static assertion is not an
integer
Original test content:
```
/*************************************************/
// https://issues.dlang.org/show_bug.cgi?id=22398
const int a;
int b = a;
```
--
    
    
More information about the Digitalmars-d-bugs
mailing list