[PATCH] Fix libdecnumber bootstrap on Tru64 (part 2)
Richard Earnshaw
rearnsha@arm.com
Tue Dec 20 11:10:00 GMT 2005
On Mon, 2005-12-19 at 21:09, Roger Sayle wrote:
> Hi Ben,
>
> Sorry to have ignored this earlier, but the compilation warnings
> building libdecnumber on Tru64 later cause a bootstrap failure during
> stage2. The problem is that the usage of tolower in decStrEq
> results in warnings about indexing an array with type "char".
> Although there are different ways to address the problem, the
> idiom below of assigning to local "unsigned char" variables is
> the same as used in libiberty's strcasecmp.
>
> Ok for mainline?
>
>
> 2005-12-19 Roger Sayle <roger@eyesopen.com>
>
> * decNumber.c (decStrEq): Cast string contents to unsigned char
> before calling tolower to avoid compilation warnings on Tru64.
tolower has EOF as part of its input domain, so I think you should
really make u1 and u2 ints; that's the natural type that a function
implementation (rather than a macro implementation) would take.
Effectively what you should be doing is applying the natural conversion
that would take place if tolower were not implemented as a macro.
OK with that change.
R.
More information about the Gcc-patches
mailing list