Re: signed/unsigned comparison warnings in kernel header files

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

 



Timur Tabi wrote:

Not only that, but the warnings are valid. The code that the compile complains about really is making a signed/unsigned comparison.

I discovered something very interesting in the gcc docs:

-Wsign-compare
Warn when a comparison between signed and unsigned values could produce an incorrect result when the signed value is converted to unsigned. This warning is enabled by -W, and by -Wall in C++ only.


This explains why the problem is showing up only on one particular system. There's something wrong with the version of gcc on SuSE 8.2. Our makefile uses /usr/bin/gcc, which has this verison info:

gcc (GCC) 3.3 20030226 (prerelease) (SuSE Linux)

It looks like this might be a bug in the SuSE 8.2 version of gcc. I've found a bunch of similar posts about the SuSE 8.2 compiler. Therefore, I'm going to chalk this up as a compiler bug.

--
Timur Tabi
Staff Software Engineer
timur.tabi@xxxxxxxxxxx

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux