March 24, 2022 [Issue 22921] New: ImportC: initializing local with address of itself does not work in CTFE | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22921 Issue ID: 22921 Summary: ImportC: initializing local with address of itself does not work in CTFE Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: bugzilla@digitalmars.com This does not compile: struct S { struct S *s; int first; int *last; }; int main() { struct S localS = { &localS, 0, &localS.first }; assertImpl(localS.s == &localS); assertImpl(localS.first == 0); assertImpl(localS.last == &localS.first); return 0; } _Static_assert(main() == 0, "Test"); -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply