From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Description of problem: std::showbase combined with std::hex in <iostream> fails to show the base if the value is 0. The following program should produce "0x0" as the output in all lines which start with: std::cout << std::hex << std::showbase... Instead this program produces output "0", skipping the "0x" base. // main.cxx #include <iostream> int main() { unsigned int var = 0; std::cout << var << "\n"; // This is a failure line, it outputs "0" instead of "0x0". std::cout << std::hex << std::showbase << var << "\n"; var = 1; std::cout << var << "\n"; std::cout << std::hex << std::showbase << var << "\n"; return 0; } Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Use std::hex and std::showbase in a std::cout, then feed 0 to the stream. Actual Results: Outputs "0". Expected Results: Outputs "0x0". Additional info: gcc-c++-4.0.1-4.fc4
Looks like bugzilla figured out how to double submit this one for me. This is a duplicate of 166735 which I did not submit. *** This bug has been marked as a duplicate of 166735 ***