Sorry if this is not a bug, but I cannot find any way why it isn't.
This is due to a rather old change in the C++ standard. I think it was between the second and third edition of the Stroustrup book, but I could be mistaken.
The C++ standard library lives in the "std" namespace. So you must either write:
std::cerr << "Whatever";
or "using namespace std::cerr" or "using namespace std"
You just saw this because gcc-2.95 did not have proper namespace support.