This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23807] Mixed-type arithmetic error
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Sep 2005 14:33:03 -0000
- Subject: [Bug c++/23807] Mixed-type arithmetic error
- References: <20050910141206.23807.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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