United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6718830 : Hotspot fails to build with gcc 4.3

Details
Type:
Bug
Submit Date:
2008-06-25
Status:
Closed
Updated Date:
2012-10-08
Project Name:
JDK
Resolved Date:
2008-07-15
Component:
hotspot
OS:
linux
Sub-Component:
runtime
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs14 (b01)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
Reading the release notes of gcc 4.3 at http://gcc.gnu.org/gcc-4.3/porting_to.html will give you a little bit surprise about how significant the gcc community has done.

An example.

#include <iostream.h>

int main()
{
  cout << "I'm too old" << endl;
  return 0;
}

Compiling with previous compilers gives:

warning: #warning This file includes at least one deprecated or
antiquated header. Please consider using one of the 32 headers found
in section 17.4.1.2 of the C++ standard. Examples include substituting
the <X> header for the <X.h> header for C++ includes, or
<iostream> instead of the deprecated header
<iostream.h>. To disable this warning use -Wno-deprecated.

But now says:

error: iostream.h: No such file or directory
In function 'int main()':
6: error: 'cout' was not declared in this scope
6: error: 'endl' was not declared in this scope

Hotspot code includes "*.h" version almost everywhere, so we have to change our code to meet the upcoming change of gcc.

                                    

Comments
EVALUATION

Fix includes two parts:
1. Remove "-Wconversion" to avoid downcast warnings.
2. Use "#include <iostream>" in our adlc code.
                                     
2008-06-27
EVALUATION

http://hg.openjdk.java.net/jdk6/jdk6/hotspot/rev/564269902fe3
                                     
2009-05-09



Hardware and Software, Engineered to Work Together