This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gold commit] PR 19577: Fix build failure in gold due to signed vs. unsigned comparisons


>> -    int32_t max = static_cast<int32_t>((1U << bits) - 1);
>> +    uint32_t max = static_cast<int32_t>((1U << bits) - 1);
>
> Shouldn't the cast be changed as well?

>> -    int64_t max = static_cast<int64_t>((static_cast<uint64_t>(1) << bits) - 1);
>> +    uint64_t max = static_cast<int64_t>((static_cast<uint64_t>(1) <<
>> bits) - 1);
>
> Here the cast doesn't make sense any more.

Oops, yes. Thanks. (I blame it on Saturday morning.)

-cary


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]