Bug 24474 – ImportC: typeof in initializer expression at function scope errors with "circular `typeof` definition"

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-04-01T05:01:11Z
Last change time
2024-12-13T19:34:24Z
Keywords
ImportC, rejects-valid
Assigned to
No Owner
Creator
dave287091
Moved to GitHub: dmd#20433 →

Comments

Comment #0 by dave287091 — 2024-04-01T05:01:11Z
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.
Comment #1 by robert.schadek — 2024-12-13T19:34:24Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20433 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB