[Bug c++/23807] Mixed-type arithmetic error
igodard at pacbell dot net
gcc-bugzilla@gcc.gnu.org
Sat Sep 10 14:33:00 GMT 2005
------- Additional Comments From igodard at pacbell dot net 2005-09-10 14:33 -------
Simpler test case:
#include <iostream>
int main () {
unsigned short us = 0;
unsigned int res = ~us;
std::cerr << "res: 0x" << std::hex << res << ", us: 0x" << us << "\n";
return 0;
}
gets you:
~/ootbc/members/src$ g++ foo.cc
~/ootbc/members/src$ a.out
res: 0xffffffff, us: 0x0
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23807
More information about the Gcc-bugs
mailing list