28 ms·
if you plan to look at pointer provenance please check recent HN discussions like this one ( https://news.ycombinator.com/item?id=42878450 https://news.ycombina
by SleepyMyroslav 1y ago
if you plan to look at pointer provenance please check recent HN discussions like this one ( https://news.ycombinator.com/item?id=42878450 https://news.ycombinator.com/item?id=42878450 ) and transitively links to source papers for C.
TLDR (imho) C has failed to define pointer provenance but had to acknowledge its existence. LLVM and GCC have their own ideas on it which means their open issues on it are different. For practical languages aiming to be useful in embedded ie Rust there are complex workarounds: https://doc.rust-lang.org/std/ptr/index.html#exposed-provenance https://doc.rust-lang.org/std/ptr/index.html#exposed-provena.... What is relevant for C3 is that it is likely to be exposed to open issues from LLVM and people will need practical ways to solve them.
ps Don't take my word for it. My tldr might be wrong because of my gamedev experience (like we dont ship products with GCC).
- lerno 1y agoIn C casting a pointer to an int and back again used to be fine. Except later people want to track the pointer to do optimizations and things went... poorly. I feel that this is a mess better addressed once there are actual implementations that you have to use, rather than the current state where people are still working out the details.