Is this a problem: Warning: Initializing RegisterImpl& to a NULL value.

Kelly O'Hair Kelly.Ohair at Sun.COM
Mon Jun 9 12:36:49 PDT 2008



Peter B. Kessler wrote:
> While building the solaris_sparc_compiler1 build (product or fastdebug)
> on a new fclone from the hotspot-gc-hs repos, I get
> 
>     Compiling 
> /net/analemma.SFBay/export/pbk/Workspaces/build/objArray-4396719-work/src/cpu/sparc/vm/sharedRuntime_sparc.cpp 
> 
>     "..../src/cpu/sparc/vm/sharedRuntime_sparc.cpp", line 2724: Warning: 
> Initializing RegisterImpl& to a NULL value.
>     1 Warning(s) detected.
> 
> The builds continue, and the resulting VM seems to work.
> 
> The code in question is
> 
>     /* 2534 */    nmethod *SharedRuntime::generate_dtrace_nmethod(
>                       MacroAssembler *masm, methodHandle method) {
>                     ....
>     /* 2723 */      VMRegPair zero;
>     /* 2724 */      zero.set2(G0->as_VMReg());
> 
> A) I thought we wrote code that compiled without warnings.
> B) I thought code that generated warnings caused the build to fail.

On Windows (/WX option) and Linux gcc/g++ (-Werror option) the answer is
yes, but with the Sun Studio compiler, nobody added the -errwarn=%all option,
not sure why it wasn't added, maybe the option did not exist way back when...???

Someone on the hotspot team should add this option to the Solaris builds.
I created bug 6712344 for this.

I've always been impressed with the way the hotspot code has been kept
warning free, someday maybe we can get the rest of the jdk code warning
free, I hope I hope I hope ...  ;^)

-kto

> 
> Should I worry about this exception?
> 
>             ... peter



More information about the hotspot-dev mailing list