[Bug c++/41161] New: Hello World in C++ ISO does NOT compile

juliorz at bellsouth dot net gcc-bugzilla@gcc.gnu.org
Tue Aug 25 01:16:00 GMT 2009


The following program which conforms to C++ ISO does NOT compile with G++
but compiles with no errors using Borland C++ 5.52 command line compiler.

#include <iostream>

int main()

{

 std::cout << "Hello World!" << std::endl;

}



The following errors are produced:

julio@linux-wp1w:~> g++ hello_iso.cpp
hello_iso.cpp:6:16: warning: missing terminating " character
hello_iso.cpp:6: error: missing terminating " character
hello_iso.cpp: In function ‘int main()’:
hello_iso.cpp:8: error: expected primary-expression before ‘}’ token
hello_iso.cpp:8: error: expected `;' before ‘}’ token
julio@linux-wp1w:~> g++ hello_iso.cpp > error.log
hello_iso.cpp:6:16: warning: missing terminating " character
hello_iso.cpp:6: error: missing terminating " character
hello_iso.cpp: In function ‘int main()’:
hello_iso.cpp:8: error: expected primary-expression before ‘}’ token
hello_iso.cpp:8: error: expected `;' before ‘}’ token


-- 
           Summary: Hello World in C++ ISO  does NOT compile
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: juliorz at bellsouth dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41161



More information about the Gcc-bugs mailing list