While trying to build WebKit-r31848(or any latest nightlies), Compilation breaks if we compile using GCC compilers with gcc version less than 4. I got this error with my gcc version 3.4.6. compilation breaks while doing: arm-linux-g++ -DHAVE_CONFIG_H -I. -I.. -DWTF_USE_ICU_UNICODE=1 -DBUILDING_GTK__=1 -DWTF_CHANGES -DNDEBUG -DENABLE_ICONDATABASE=0 -I../JavaScriptCore -I../JavaScriptCore/ForwardingHeaders -I../JavaScriptCore/wtf -I../JavaScriptCore/kjs -I./DerivedSources -I../JavaScriptCore/ForwardingHeaders -I../JavaScriptCore/wtf/unicode -I./JavaScriptCore/pcre -I./JavaScriptCore/kjs -I/home/srinirao/webkit/myprefix/include -I/home/srinirao/webkit/myprefix/../../../libs/libjpeg -I/home/srinirao/webkit/myprefix/include/freetype2 -fno-rtti -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 -fno-exceptions -pthread -I/home/srinirao/webkit/myprefix/include/glib-2.0 -I/home/srinirao/webkit/myprefix/lib/glib-2.0/include -I/home/srinirao/webkit/myprefix/include -I/home/srinirao/webkit/myprefix/../../../libs/libjpeg -I/home/srinirao/webkit/myprefix/include/freetype2 -I/home/srinirao/webkit/myprefix/include/readline -D_REENTRANT -I/home/srinirao/webkit/myprefix/include -fno-strict-aliasing -O2 -MT JavaScriptCore/kjs/libJavaScriptCore_la-JSGlobalObject.lo -MD -MP -MF JavaScriptCore/kjs/.deps/libJavaScriptCore_la-JSGlobalObject.Tpo -c ../JavaScriptCore/kjs/JSGlobalObject.cpp -fPIC -DPIC -o JavaScriptCore/kjs/.libs/libJavaScriptCore_la-JSGlobalObject.o mv -f JavaScriptCore/kjs/.deps/libJavaScriptCore_la-JSGlobalObject.Tpo JavaScriptCore/kjs/.deps/libJavaScriptCore_la-JSGlobalObject.Plo /bin/sh ./libtool --tag=CXX --mode=compile arm-linux-g++ -DHAVE_CONFIG_H -I. -I.. -DWTF_USE_ICU_UNICODE=1 -DBUILDING_GTK__=1 -DWTF_CHANGES -DNDEBUG -DENABLE_ICONDATABASE=0 -I../JavaScriptCore -I../JavaScriptCore/ForwardingHeaders -I../JavaScriptCore/wtf -I../JavaScriptCore/kjs -I./DerivedSources -I../JavaScriptCore/ForwardingHeaders -I../JavaScriptCore/wtf/unicode -I./JavaScriptCore/pcre -I./JavaScriptCore/kjs -I/home/srinirao/webkit/myprefix/include -I/home/srinirao/webkit/myprefix/../../../libs/libjpeg -I/home/srinirao/webkit/myprefix/include/freetype2 -fno-rtti -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 -fno-exceptions -pthread -I/home/srinirao/webkit/myprefix/include/glib-2.0 -I/home/srinirao/webkit/myprefix/lib/glib-2.0/include -I/home/srinirao/webkit/myprefix/include -I/home/srinirao/webkit/myprefix/../../../libs/libjpeg -I/home/srinirao/webkit/myprefix/include/freetype2 -I/home/srinirao/webkit/myprefix/include/readline -D_REENTRANT -I/home/srinirao/webkit/myprefix/include -fno-strict-aliasing -O2 -MT JavaScriptCore/kjs/libJavaScriptCore_la-AllInOneFile.lo -MD -MP -MF JavaScriptCore/kjs/.deps/libJavaScriptCore_la-AllInOneFile.Tpo -c -o JavaScriptCore/kjs/libJavaScriptCore_la-AllInOneFile.lo `test -f 'JavaScriptCore/kjs/AllInOneFile.cpp' || echo '../'`JavaScriptCore/kjs/AllInOneFile.cpp arm-linux-g++ -DHAVE_CONFIG_H -I. -I.. -DWTF_USE_ICU_UNICODE=1 -DBUILDING_GTK__=1 -DWTF_CHANGES -DNDEBUG -DENABLE_ICONDATABASE=0 -I../JavaScriptCore -I../JavaScriptCore/ForwardingHeaders -I../JavaScriptCore/wtf -I../JavaScriptCore/kjs -I./DerivedSources -I../JavaScriptCore/ForwardingHeaders -I../JavaScriptCore/wtf/unicode -I./JavaScriptCore/pcre -I./JavaScriptCore/kjs -I/home/srinirao/webkit/myprefix/include -I/home/srinirao/webkit/myprefix/../../../libs/libjpeg -I/home/srinirao/webkit/myprefix/include/freetype2 -fno-rtti -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 -fno-exceptions -pthread -I/home/srinirao/webkit/myprefix/include/glib-2.0 -I/home/srinirao/webkit/myprefix/lib/glib-2.0/include -I/home/srinirao/webkit/myprefix/include -I/home/srinirao/webkit/myprefix/../../../libs/libjpeg -I/home/srinirao/webkit/myprefix/include/freetype2 -I/home/srinirao/webkit/myprefix/include/readline -D_REENTRANT -I/home/srinirao/webkit/myprefix/include -fno-strict-aliasing -O2 -MT JavaScriptCore/kjs/libJavaScriptCore_la-AllInOneFile.lo -MD -MP -MF JavaScriptCore/kjs/.deps/libJavaScriptCore_la-AllInOneFile.Tpo -c ../JavaScriptCore/kjs/AllInOneFile.cpp -fPIC -DPIC -o JavaScriptCore/kjs/.libs/libJavaScriptCore_la-AllInOneFile.o In file included from ../JavaScriptCore/kjs/AllInOneFile.cpp:40: ../JavaScriptCore/kjs/dtoa.cpp: In function `void kjs_freedtoa(char*)': ../JavaScriptCore/kjs/dtoa.cpp:2259: warning: cast from `char*' to `int*' increases required alignment of target type In file included from ../JavaScriptCore/kjs/AllInOneFile.cpp:55: ../JavaScriptCore/kjs/nodes.cpp: At global scope: ../JavaScriptCore/kjs/nodes.h:213: error: `typedef enum KJS::ExpressionNode::CallerType KJS::ExpressionNode::CallerType' is protected ../JavaScriptCore/kjs/nodes.cpp:1090: error: within this context make[1]: *** [JavaScriptCore/kjs/libJavaScriptCore_la-AllInOneFile.lo] Error 1 make[1]: Leaving directory `/home/srinirao/webkit/WebKit-r31848/objdir' make: *** [all] Error 2 I will be submitting a patch for this bug.
Created attachment 20545 [details] Suggested patch for this bug Attaching the patch for this bug. I am not sure whether it affects any other module. Please review it.
Comment on attachment 20545 [details] Suggested patch for this bug Although darin's comment was kinda confusing on the list, the proper behavior is to mark the patch review=? instead of review=+ This patch requires a ChangeLog (see prepare-ChangeLog) before we can land it. Thanks!
Created attachment 20546 [details] latest patch Patch created using svn-createpatch on 31896 Prepared a Changelog entry
Created attachment 20577 [details] better patch This patch contains no ifdefs to check the compiler. But the line with typedef is made public in order for the compilation with GCC 3.x go through. Done after discussing with Eric Seidel and Maciej Stachowiak on IRC
Created attachment 20612 [details] corrected patch Added the Changelog comment
Comment on attachment 20612 [details] corrected patch r=me
Landed in r31991.