bug-coreutils
[Top][All Lists]
Advanced

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

Re: [bug-grep] Re: length of dec. representation of a number


From: Jim Meyering
Subject: Re: [bug-grep] Re: length of dec. representation of a number
Date: Thu, 10 Mar 2005 21:11:22 +0100

address@hidden (Paul Jarc) wrote:
> Jim Meyering <address@hidden> wrote:
>> Technically, yes, but that would prohibit applying that macro
>> to variables, which is useful.  Currently there are uses like
>> that in the coreutils.
>
> Ah - well, it's easy enough to factor, so you'd have to specify the
> signedness explicitly for variables, but it would be automatically
> detected for types.
> #define INT_STRLEN_BOUND_VAR(t, signedness) ...
> #define INT_STRLEN_BOUND_TYPE(t) INT_STRLEN_BOUND_VAR(t, TYPE_SIGNED(t))

I don't see the benefit.
Having to specify signedness makes it unmaintainable.
It'd be too easy to get wrong, or (more likely) to render
incorrect with a subsequent variable type change.




reply via email to

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