This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: signed vs unsigned comparison warnings


> In my experience, using unsigned in C is almost always a mistake.
> The way conversion works, it does create all sorts of nasty problems
> that don't exist with signed arithmetic, and the extra bit of precision
> is VERY rarely useful.

Using unsigned instead of signed division by a constant power of two can
make a significant difference in code size and speed.

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