[Issue 23054] importC: struct compound-literal assigned by pointer has wrong storage duration

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 12 19:55:22 UTC 2022


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

--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> ---
test3 is checking the location of the temporary. C11 does not specify the
location. Whether the address matches or not in the scope in the loop does not
matter, as the lifetime of the temporary does not survive the scope.

In any case, the temporary is allocated on the stack, not statically and not on
the GC heap.

--


More information about the Digitalmars-d-bugs mailing list