Hacker News new | ask | show | jobs
by _nalply 423 days ago
I do understand.

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.

1 comments

But that doesn't make any difference in the way you have to address existing `char arr[4] = "abcd"` declarations.
True.

This would be only useful in typedefs. An API could declare some byte arrays not strings. But again, whatever.