From Bugzilla Helper: User-Agent: Mozilla/4.79 [en] (X11; U; Linux 2.4.18-10 i686) Description of problem: Programs that compiled just fine under RedHat 7.3 and earlier with g++ now fail to compile at all under RedHat 8.0 Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.run g++ on the following program: int main() { cout << "Hello, world!" << endl; } 2.It works fine under RedHat 7.3 and below 3.It fails to compile under RedHat 8.0 Actual Results: test2.C: In function `int main()': test2.C:5: `cout' undeclared (first use this function) test2.C:5: (Each undeclared identifier is reported only once for each function it appears in.) test2.C:5: `endl' undeclared (first use this function) Expected Results: No error messages should appear Additional info:
Your testcase is not ISO C++. You need to use std::cout and std::endl or add using directive (plus you forgot to include header).