bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/4] dfa: prefer signed integers for internals


From: Paul Eggert
Subject: Re: [PATCH 4/4] dfa: prefer signed integers for internals
Date: Wed, 11 Dec 2019 20:22:08 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 12/11/19 5:21 PM, Bruno Haible wrote:
Last time we were trying to find a good name for this typedef. How about

   typedef ptrdiff_t uptrdiff_t;

"u" connotes "unsigned"; but "nonnegative but signed" is what is wanted here, and it is not the same thing.

Some of the ptrdiff_t values in dfa.c can be negative. Some can be -1 or nonnegative. Will we need more types for these other possibilities?

Also, where would we put these new typedefs? dfa.h doesn't seem like the right place.

     It's quite possible that clang will have range types, 5 years from now.

I've been wanting, off and on, to get range types into the C world since the 1980s. It hasn't happened yet.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]