D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22883 - ImportC: sizeof(var) rejected if used as initializer of the same var
Summary: ImportC: sizeof(var) rejected if used as initializer of the same var
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P3 normal
Assignee: No Owner
URL: http://dlang.org/
Keywords: ImportC
Depends on:
Blocks:
 
Reported: 2022-03-16 18:09 UTC by Andrea Fontana
Modified: 2022-03-19 06:22 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrea Fontana 2022-03-16 18:09:07 UTC
test.c:
void f() { int t = (int)(sizeof(t)); }

dmd test.c
test.c(1): Error: undefined identifier `t`
Comment 1 Walter Bright 2022-03-19 06:22:37 UTC
This has already been fixed in master.