Bug 76165 - g++ is broken
Summary: g++ is broken
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 8.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-17 19:06 UTC by Ed Friedman
Modified: 2007-04-18 16:47 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-10-17 19:06:26 UTC
Embargoed:


Attachments (Terms of Use)

Description Ed Friedman 2002-10-17 19:06:19 UTC
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:

Comment 1 Jakub Jelinek 2002-10-17 19:37:55 UTC
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).


Note You need to log in before you can comment on or make changes to this bug.