On 12/2/20 3:56 PM, Bruno Haible wrote:
can we have typedef names for these signed types that are supposed to only have values >= 0 ?
More generally, when I'm reviewing code I naturally look for relationships like 0 <= i < j < n. I can see where one might want to say "j is of type i+1 .. n-1" but all things considered it'd be better for the compiler and/or human reader to infer that sort of thing, than to clutter the code with something like "int __attribute__ ((range (i+1 .. n-1))) j;" when declaring j. Of course "idx_t j;" is much less clutter than the __attribute__ stuff but it's not clear that it's worth the bother to have yet another integer type for this sort of thing.