------- Comment #2 from fredrik dot hederstierna at securitas-direct dot com
2008-12-01 12:40 -------
Then why dont we get warning on the first if-statement?
Shouldnt these lines be equal?
if (c1 == (unsigned char)(~c2)) {
}
if (u1 == (u8_t)(~u2)) { // THIS WILL GIVE WARNING
}
The first if-statement does not give warnings, should this be evaluated the
same way?
if ((int)c1 == (int)(unsigned char)(~(int)c2)) {
My idea was that either of the if-statements are wrong. Either both or none
should give warnings, or am I wrong? The typedef to "unsigned char" should be
the same as using primitive types regarding this warning, or?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38341