I either don't understand how the annotation would work on types, or what would be gained by it. What type would be annotated? A typedef to char[]?
edit: Unless what they actually mean is annotating struct members, that would actually make sense.
edit: Unless what they actually mean is annotating struct members, that would actually make sense.
I imagine that it could work a little bit like unsigned: a modifier to integer types that tells that an integer's MSB is not to be used as a sign bit.
__nonstring__ tells that the last byte of a byte sequence doesn't need to be NUL.
I would find it sensible allowing putting the attribute to a type, but whatever.
This would be only useful in typedefs. An API could declare some byte arrays not strings. But again, whatever.