Mixing safe and unsafe
Mixing safe and unsafe
Posted Oct 30, 2025 13:15 UTC (Thu) by tialaramex (subscriber, #21167)In reply to: Mixing safe and unsafe by matthias
Parent article: Fil-C: A memory-safe C implementation
Where are you seeing the claim that one-past-the-end is privileged in this way? I can't see it in anything I reviewed, but I only briefly flipped past because I'm on a lunch break.
Likewise I didn't find a claim that *ptr = some_goose; is sound when Goose is not Drop. I can see in principle how this could be arranged, but I couldn't think of any reason I would want it, and since we're unsafe if it isn't legal the compiler isn't going to necessarily point out the problem, so if it is legal I want a URL to drop in an adjacent safety comment so people know why I thought it was OK to write this.
