------- Additional Comments From x at xman dot org 2005-09-07 18:40 ------- The behavior we are mimicing isn't printf()'s behavior. printf() doesn't print out hexadecimal signed integers as though they were unsigned integers. Intead, C's type coercion allows the signed integers to be interpreted as unsigned integers, and printf() then prints out the unsigned integers. While I understand the value of printf() compatibility, one of the key differentiators with iostreams is type safety, which is effectively broken with the current behavior. If we wanted to preserve printf() like behavior then 'cout << hex << "some string"' should print out the address of the string literal in hex, rather than the string literal's contents, ignoring the hex flag completely.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23757