My point was that this dance around "observed behaviour" isn't needed in C11, as per: "(...) on C11 (are there any fully C11-compliant platforms yet?) you can use the memset_s function. (...) [which is] guaranteed (or at least specified) to write the provided buffer and to not be optimized away."
On another note, searching for memset_s and openbsd yielded this hit from 2012:
On another note, searching for memset_s and openbsd yielded this hit from 2012:
https://mail-index.netbsd.org/tech-security/2012/07/22/msg00...
Which seems to point back to:
https://mail-index.netbsd.org/tech-userlevel/2012/02/25/msg0...
So I guess the "trick" outlined in the (very lucid) post has been known for a while.