https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96503
--- Comment #5 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> --- This could work for alloc_size, but not quite for access. pointer_with_size (or __builtin_with_size as you suggested in that thread) would need to express access semantics too, to be able to express everything that access does.