United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6469784 : Hotspot doesn't build with gcc without precompiled headers

Details
Type:
Bug
Submit Date:
2006-09-12
Status:
Closed
Updated Date:
2016-08-02
Project Name:
JDK
Resolved Date:
2016-08-02
Component:
hotspot
OS:
generic
Sub-Component:
build
CPU:
generic
Priority:
P4
Resolution:
Not an Issue
Affected Versions:
7
Fixed Versions:
10

Related Reports

Sub Tasks

Description
GCC emits a warning (treated as an error) if an inline method is declared and used without the body being present, even if the calling function is in a header file and is not being used.  This occurs in a couple place in hotspot:

Compiling src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp
/home/km88527/ws/rt_baseline/src/share/vm/oops/markOop.hpp:208: warning: inline
function `bool markOopDesc::must_be_preserved_with_bias(oopDesc*) const' used bu
t never defined
/home/km88527/ws/rt_baseline/src/share/vm/oops/markOop.hpp:232: warning: inline
function `bool markOopDesc::must_be_preserved_with_bias_for_promotion_failure(oo
pDesc*) const' used but never defined
/home/km88527/ws/rt_baseline/src/share/vm/oops/markOop.hpp:243: warning: inline
function `bool markOopDesc::must_be_preserved_with_bias_for_cms_scavenge(klassOo
pDesc*) const' used but never defined
gmake[2]: *** [adaptiveSizePolicy.o] Error 1

Sun's CC doesn't complain about this, and since the linux builds build with precompiled headers, we don't see this in the current builds.

                                    

Comments
Hotspot is regularly built without PCH. This issue was fixed long ago (and gets re-fixed if issues creep in).
                                     
2016-08-02
EVALUATION

The few places where this occurs can be corrected by moving the calling method either into the inline file or cpp file as appropriate.
                                     
2006-09-12



Hardware and Software, Engineered to Work Together