Error in jvm_linux.cpp on Ubuntu 8.04: deprecated conversion from string constant to 'char*'
Jesse Glick
jesse.glick at sun.com
Tue Apr 29 16:38:35 UTC 2008
Compiling /space/src/jdk7/hotspot/src/os/linux/vm/jvm_linux.cpp
rm -f jvm_linux.o
g++ -DLINUX -D_GNU_SOURCE -DIA32 -DPRODUCT -I. -I../generated/adfiles
-I<<redacted>> -DHOTSPOT_RELEASE_VERSION="\"12.0-b03\""
-DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"jglick\""
-DJRE_RELEASE_VERSION="\"1.7.0-internal-jglick_2008_04_29_11_32-b00\""
-DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -DCOMPILER2 -DCOMPILER1 -fno-rtti
-fno-exceptions -D_REENTRANT -fcheck-new -m32 -march=i586 -pipe -O3
-fno-strict-aliasing -DVM_LITTLE_ENDIAN -Werror -Wpointer-arith
-Wconversion -Wsign-compare -c -o jvm_linux.o
/space/src/jdk7/hotspot/src/os/linux/vm/jvm_linux.cpp
cc1plus: warnings being treated as errors
/space/src/jdk7/hotspot/src/os/linux/vm/jvm_linux.cpp:179: warning:
deprecated conversion from string constant to 'char*'
/space/src/jdk7/hotspot/src/os/linux/vm/jvm_linux.cpp:179: warning:
deprecated conversion from string constant to 'char*'
[...repeated many times...]
/space/src/jdk7/hotspot/src/os/linux/vm/jvm_linux.cpp:179: warning:
deprecated conversion from string constant to 'char*'
make[5]: *** [jvm_linux.o] Error 1
Google shows the problem but no solution:
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2008-February/001113.html
There are other similar errors later. I am attaching a sort of crude
patch (for the hotspot tree, suitable for MQ) which seems to make things
compile. Perhaps a newer version of GCC is just stricter?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: const-string-cast-compiler-error.diff
Type: text/x-diff
Size: 1731 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20080429/fa88e2bd/const-string-cast-compiler-error.diff>
More information about the build-dev
mailing list