Paul Eggert wrote:
> Using signed types is better nowadays than using unsigned types, since
> many platforms now check for signed integer overflow and this can catch many
> bugs, some of them security-relevant, whereas unsigned arithmetic is well
> defined to wrap around with no overflow check
Hi Paul,
> The name I'm currently
> thinking of is 'in_t', short for "index type". That's an
> easy-to-remember name (the type is like 'int', but possibly wider).
Fine with me.
It doesn't collide: Only very few packages use this identifier 'in_t', and
only in isolated places.
> One other
On 06/07/2017 02:53 PM, Bruno Haible wrote:
I don't really mind the name of the type - as
long as it's a typedef.
I've been leaning towards a name that doesn't start with 'w', since the
type is not specific to the walloc module family. The name I'm currently
thinking of is 'in_t', short for
I wrote:
> typedef ptrdiff_t wsize_t;
'wsize_t' or 'wcount_t'. I don't really mind the name of the type - as
long as it's a typedef.
Bruno
Hi Paul,
> GNU Emacs has long been using signed types (typically ptrdiff_t) to count
> objects. This has the advantage that signed integer overflow can be detected
> automatically on some platforms (unfortunately, size_t arithmetic silently
> wraps
> around).
I have one objection, but a big