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: [email protected]
          Reporter: [email protected]

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.

--

Reply via email to