[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] minor warning glitch in tar 1.19 on Solaris 8 (sparc) with
Re: [Bug-tar] minor warning glitch in tar 1.19 on Solaris 8 (sparc) with GCC 4.2.1
Tue, 16 Oct 2007 00:18:23 -0700
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)
Jan-Benedict Glaw <address@hidden> writes:
>> - if (! (0 <= *p && *p <= 127))
>> + if (*p & ~0x7f)
> The `char' type, in difference to all other integer type, has no
> default signedness. On some compilers, "char" is "signed char", on
> others, it's a "unsigned char".
Yes. The above code should work with either kind of compiler.
> To really keep readability, I'd
> rather have a local unsigned char variable and operate on it with
> if (*foo >= 127) return false.
Would that be any more readable? (It'd certainly be longer. :-)