[Issue 24474] New: ImportC: typeof in initializer expression at function scope errors with "circular `typeof` definition"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 1 05:01:11 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24474

          Issue ID: 24474
           Summary: ImportC: typeof in initializer expression at function
                    scope errors with "circular `typeof` definition"
           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

This valid C code:

int x = sizeof(typeof(x));
int main(){
    int y = sizeof(typeof(y));
}

Errors with: 

t.c(3): Error: circular `typeof` definition.

As you can see it does not error at file scope however.

--


More information about the Digitalmars-d-bugs mailing list