Powered by Linux
Signedness of 'char' — Semantic Matching Tool

Signedness of 'char'

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

 



Running smatch on s390x incorrectly reports impossible conditions when
comparing variables of type 'char' with constant values larger than 127,
even though 'char' is implemented on s390x as unsigned type.

A solution to this problem might be to use the __CHAR__UNSIGNED__ macro [1]
to determine the correct signedness of the 'char' type at compile time.


Regards,
  Peter Oberparleiter

[1] http://gcc.gnu.org/onlinedocs/gcc-4.0.4/cpp/Common-Predefined-Macros.html

-- 
Peter Oberparleiter
Linux on System z Development - IBM Germany

--
To unsubscribe from this list: send the line "unsubscribe smatch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux