[webkit-dev] ISO C++ forbids casting between pointer-to-function and pointer-to-object

Dennis Heuer dh at triple-media.com
Sun Mar 8 00:34:55 PST 2009


hello

the JIT does some 'forbidden stuff'. i use gcc-3.4.6 on linux 2.6.28

./doltlibtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.
-DWTF_USE_ICU_UNICODE=1 -DBUILDING_CAIRO__=1 -DBUILDING_GTK__=1
-DWTF_CHANGES  -DXP_UNIX -DNDEBUG    -I./JavaScriptCore
-I./JavaScriptCore/ForwardingHeaders -I./JavaScriptCore/parser
-I./JavaScriptCore/wtf -I./DerivedSources -I./JavaScriptCore/API
-I./JavaScriptCore/ForwardingHeaders -I./JavaScriptCore/interpreter
-I./JavaScriptCore/bytecode -I./JavaScriptCore/bytecompiler
-I./JavaScriptCore/debugger -I./JavaScriptCore/jit
-I./JavaScriptCore/pcre -I./JavaScriptCore/profiler
-I./JavaScriptCore/runtime -I./JavaScriptCore/wrec
-I./JavaScriptCore/jit -I./JavaScriptCore/assembler
-I./JavaScriptCore/wtf/unicode -I./JavaScriptCore/pcre
-I./JavaScriptCore/parser -I./JavaScriptCore/runtime   -fno-rtti
-fstrict-aliasing -O3 -Wall -W -Wcast-align -Wchar-subscripts
-Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef
-Wmissing-format-attribute -Wpointer-arith -Wwrite-strings
-Wno-unused-parameter -Wno-parentheses -fno-exceptions  -pthread
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -D_REENTRANT
-I/usr/include -O2 -MT JavaScriptCore/jit/libJavaScriptCore_la-JIT.lo
-MD -MP -MF JavaScriptCore/jit/.deps/libJavaScriptCore_la-JIT.Tpo -c -o
JavaScriptCore/jit/libJavaScriptCore_la-JIT.lo `test -f
'JavaScriptCore/jit/JIT.cpp' || echo './'`JavaScriptCore/jit/JIT.cpp In
file included from JavaScriptCore/jit/JIT.cpp:27:
JavaScriptCore/jit/JIT.h: In member function
`JSC::AbstractMacroAssembler<JSC::X86Assembler>::Call
JSC::JIT::emitCTICall(JSC::JSValueEncodedAsPointer*(*)(void*, ...))':
JavaScriptCore/jit/JIT.h:529: error: ISO C++ forbids casting between
pointer-to-function and pointer-to-object JavaScriptCore/jit/JIT.h: In
member function `JSC::AbstractMacroAssembler<JSC::X86Assembler>::Call
JSC::JIT::emitCTICall(JSC::JSObject*(*)(void*, ...))':
JavaScriptCore/jit/JIT.h:530: error: ISO C++ forbids casting between
pointer-to-function and pointer-to-object JavaScriptCore/jit/JIT.h: In
member function `JSC::AbstractMacroAssembler<JSC::X86Assembler>::Call
JSC::JIT::emitCTICall(JSC::JSPropertyNameIterator*(*)(void*, ...))':
JavaScriptCore/jit/JIT.h:531: error: ISO C++ forbids casting between
pointer-to-function and pointer-to-object JavaScriptCore/jit/JIT.h: In
member function `JSC::AbstractMacroAssembler<JSC::X86Assembler>::Call
JSC::JIT::emitCTICall(void (*)(void*, ...))':
JavaScriptCore/jit/JIT.h:532: error: ISO C++ forbids casting between
pointer-to-function and pointer-to-object JavaScriptCore/jit/JIT.h: In
member function `JSC::AbstractMacroAssembler<JSC::X86Assembler>::Call
JSC::JIT::emitCTICall(void*(*)(void*, ...))':
JavaScriptCore/jit/JIT.h:533: error: ISO C++ forbids casting between
pointer-to-function and pointer-to-object JavaScriptCore/jit/JIT.h: In
member function `JSC::AbstractMacroAssembler<JSC::X86Assembler>::Call
JSC::JIT::emitCTICall(int (*)(void*, ...))':
JavaScriptCore/jit/JIT.h:534: error: ISO C++ forbids casting between
pointer-to-function and pointer-to-object JavaScriptCore/jit/JIT.h: In
member function `JSC::AbstractMacroAssembler<JSC::X86Assembler>::Call
JSC::JIT::emitCTICall(JSC::VoidPtrPair (*)(void*, ...))':
JavaScriptCore/jit/JIT.h:535: error: ISO C++ forbids casting between
pointer-to-function and
pointer-to-object ./JavaScriptCore/assembler/AbstractMacroAssembler.h:
In member function `void
JSC::AbstractMacroAssembler<AssemblerType>::PatchBuffer::link(JSC::AbstractMacroAssembler<AssemblerType>::Call,
FunctionSig*) [with FunctionSig =
JSC::JSValueEncodedAsPointer*()(void*, ...), AssemblerType =
JSC::X86Assembler]': JavaScriptCore/jit/JIT.cpp:1880:   instantiated
from here ./JavaScriptCore/assembler/AbstractMacroAssembler.h:664:
error: ISO C++ forbids casting between pointer-to-function and
pointer-to-object ./JavaScriptCore/assembler/AbstractMacroAssembler.h:
In member function `void
JSC::AbstractMacroAssembler<AssemblerType>::PatchBuffer::link(JSC::AbstractMacroAssembler<AssemblerType>::Call,
FunctionSig*) [with FunctionSig = JSC::VoidPtrPair ()(void*, ...),
AssemblerType = JSC::X86Assembler]': JavaScriptCore/jit/JIT.cpp:1893:
instantiated from
here ./JavaScriptCore/assembler/AbstractMacroAssembler.h:664: error:
ISO C++ forbids casting between pointer-to-function and
pointer-to-object ./JavaScriptCore/assembler/AbstractMacroAssembler.h:
In member function `void
JSC::AbstractMacroAssembler<AssemblerType>::PatchBuffer::link(JSC::AbstractMacroAssembler<AssemblerType>::Call,
FunctionSig*) [with FunctionSig = void*()(void*, ...), AssemblerType =
JSC::X86Assembler]': JavaScriptCore/jit/JIT.cpp:1896:   instantiated
from here ./JavaScriptCore/assembler/AbstractMacroAssembler.h:664:
error: ISO C++ forbids casting between pointer-to-function and
pointer-to-object
make[1]: *** [JavaScriptCore/jit/libJavaScriptCore_la-JIT.lo] Error 1 
make[1]: Leaving directory `/home/dennis/Desktop/Neues/WebKit-r41443'
make: *** [all] Error 2

regards,
dennis heuer



More information about the webkit-dev mailing list