WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
53760
JSC fails to build with TOT Clang
https://bugs.webkit.org/show_bug.cgi?id=53760
Summary
JSC fails to build with TOT Clang
Cameron Zwarich (cpst)
Reported
2011-02-03 23:30:20 PST
Building JSC gives the following error (amongst others): CompileC /Volumes/Data/symroots/JavaScriptCore.build/Debug/JavaScriptCore.build/Objects-normal/x86_64/Arguments.o runtime/Arguments.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 cd /Volumes/Data/WebKit-OpenSource/Source/JavaScriptCore setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fno-exceptions -fno-rtti -fpascal-strings -fasm-blocks -O0 -Werror -Wmissing-prototypes -Wnon-virtual-dtor -Wnewline-eof -DHAVE_DTRACE=1 -DWEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST -DHAVE_HEADER_DETECTION_H -fstrict-aliasing -fvisibility-inlines-hidden -fno-threadsafe-statics -mmacosx-version-min=10.6 -gdwarf-2 -I/Volumes/Data/symroots/JavaScriptCore.build/Debug/JavaScriptCore.build/JavaScriptCore.hmap -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -F/Volumes/Data/symroots/Debug -I/Volumes/Data/symroots/Debug/include -I/Volumes/Data/symroots/Debug/DerivedSources/JavaScriptCore -I. -Iicu -I/Volumes/Data/symroots/JavaScriptCore.build/Debug/JavaScriptCore.build/DerivedSources/x86_64 -I/Volumes/Data/symroots/JavaScriptCore.build/Debug/JavaScriptCore.build/DerivedSources -include /var/folders/1t/1tFPZz2zFG8060hthPyLrk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/JavaScriptCorePrefix-auvrpfrvjgzoucgqyebkkitidjdk/JavaScriptCorePrefix.h -c /Volumes/Data/WebKit-OpenSource/Source/JavaScriptCore/runtime/Arguments.cpp -o /Volumes/Data/symroots/JavaScriptCore.build/Debug/JavaScriptCore.build/Objects-normal/x86_64/Arguments.o In file included from /Volumes/Data/WebKit-OpenSource/Source/JavaScriptCore/runtime/Arguments.cpp:26: /Volumes/Data/WebKit-OpenSource/Source/JavaScriptCore/runtime/Arguments.h:110:22: error: 'JSC::Arguments::put' hides overloaded virtual function [-Woverloaded-virtual] virtual void put(ExecState*, unsigned propertyName, JSValue, PutPropertySlot&); ^ In file included from /Volumes/Data/WebKit-OpenSource/Source/JavaScriptCore/runtime/Arguments.cpp:26: In file included from /Volumes/Data/WebKit-OpenSource/Source/JavaScriptCore/runtime/Arguments.h:27: In file included from /Volumes/Data/WebKit-OpenSource/Source/JavaScriptCore/runtime/JSActivation.h:32: In file included from /Volumes/Data/WebKit-OpenSource/Source/JavaScriptCore/bytecode/CodeBlock.h:33: In file included from /Volumes/Data/WebKit-OpenSource/Source/JavaScriptCore/bytecode/EvalCodeCache.h:32: In file included from /Volumes/Data/WebKit-OpenSource/Source/JavaScriptCore/runtime/Executable.h:30: In file included from /Volumes/Data/WebKit-OpenSource/Source/JavaScriptCore/runtime/JSFunction.h:27: In file included from /Volumes/Data/WebKit-OpenSource/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h:29: /Volumes/Data/WebKit-OpenSource/Source/JavaScriptCore/runtime/JSObject.h:113:22: note: hidden overloaded virtual function 'JSC::JSObject::put' declared here virtual void put(ExecState*, unsigned propertyName, JSValue value); ^ 1 error generated. We use the idiom of adding new variants of an overloaded virtual function in derived classes throughout JSC, mostly with put() and getOwnProperty() functions. Perhaps we should give the overloaded versions a different name so we can keep the otherwise useful warning enabled?
Attachments
Proposed patch
(6.12 KB, patch)
2011-02-13 02:05 PST
,
Cameron Zwarich (cpst)
mitz: review+
zwarich
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Geoffrey Garen
Comment 1
2011-02-03 23:42:10 PST
I thin in most cases we can get rid of the custom overload. For example, in the arguments case, I don't think there's any reason to take a PutPropertySlot argument.
Cameron Zwarich (cpst)
Comment 2
2011-02-04 00:19:43 PST
I've got a patch that gets rid of the custom overloads in JSC. I just need to do more testing.
Cameron Zwarich (cpst)
Comment 3
2011-02-13 02:05:29 PST
Created
attachment 82255
[details]
Proposed patch
Cameron Zwarich (cpst)
Comment 4
2011-02-13 02:24:22 PST
Landed in
r78428
. I'm building a new Clang to see if nothing else has been introduced before closing this.
Cameron Zwarich (cpst)
Comment 5
2011-02-13 03:13:43 PST
Verified that JSC builds with Clang
r125450
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug