by notaplumber · 5y ago · 0 comments
It's a de facto standard supported on *BSD/macOS/Android/Linux(w/ musl libc) and a number of other commercial systems, it's also on track for standardization in POSIX (Issue 8).
https://www.austingroupbugs.net/view.php?id=986#c5050
https://www.opengroup.org/austin/docs/austin_1110.pdf
While it might not meet your arbitrary set of requirements, it already has decent adoption.
This is similar to how strlen(x)>0 calls get optimized to *x by clang and likely other compilers.