Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
clairebyte
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
clairebyte
2y ago
If you can guarantee its always compiled in a separate TU and never inlined, sure, might be a practical way so 'solve' this issue, but if you then do some LTO (or do a unity build or something) the compiler might suddenly break yo
2.
▲
by
clairebyte
2y ago
>The act of writing a value of a different type tells the compiler that the lifetime of the previous object has ended. afaik only memcpy has that magic property, so I think parent is almost correct. void *p = malloc(n); *(int *)p =