This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/23807] Mixed-type arithmetic error


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]