RESOLVED INVALID 38391
makeprop and makevalues: fix build with gcc 4.5
https://bugs.webkit.org/show_bug.cgi?id=38391
Summary makeprop and makevalues: fix build with gcc 4.5
Leandro Pereira
Reported 2010-04-30 08:47:37 PDT
When building with gcc 4.5, I get errors like this: [ 10%] Building C object WebCore/CMakeFiles/webcoreefl.dir/__/DerivedSources/CSSValueKeywords.c.o In file included from CSSValueKeywords.gperf:4:0: /home/leandro/svn/webkit/build/DerivedSources/CSSValueKeywords.h:631:14: error: expected '=', ',', ';', ' asm' or '__attribute__' before 'maxCSSValueKeywordLength' CSSValueKeywords.gperf: In function 'findValue': CSSValueKeywords.gperf:301:7: error: initializer element is not constant CSSValueKeywords.gperf:301:7: error: (near initialization for 'wordlist_value[0].id') CSSValueKeywords.gperf:34:7: error: initializer element is not constant CSSValueKeywords.gperf:34:7: error: (near initialization for 'wordlist_value[1].id') CSSValueKeywords.gperf:318:7: error: initializer element is not constant CSSValueKeywords.gperf:318:7: error: (near initialization for 'wordlist_value[2].id') CSSValueKeywords.gperf:299:7: error: initializer element is not constant (...) The first message is because size_t isn't defined (stddef.h needs to be included), the rest I don't really know why they happen, but changing the declarations in CSSValueKeywords.h to an enum (just like makeprop does) fixes the problem. Also, the generated C files needs to include string.h because they use strncmp(). Attached patch fixes these problems.
Attachments
makeprop and makevalues: fix build with gcc 4.5 (3.53 KB, patch)
2010-04-30 10:27 PDT, Leandro Pereira
eric: review-
Leandro Pereira
Comment 1 2010-04-30 10:27:51 PDT
Created attachment 54812 [details] makeprop and makevalues: fix build with gcc 4.5
Early Warning System Bot
Comment 2 2010-04-30 10:39:51 PDT
WebKit Review Bot
Comment 3 2010-04-30 10:51:15 PDT
WebKit Review Bot
Comment 4 2010-04-30 10:56:58 PDT
Eric Seidel (no email)
Comment 5 2010-04-30 11:40:46 PDT
Comment on attachment 54812 [details] makeprop and makevalues: fix build with gcc 4.5 Looks like this would break several builds: ../../WebCore/css/CSSPrimitiveValue.h: In constructor ‘WebCore::CSSImageValue::CSSImageValue()’: ../../WebCore/css/CSSPrimitiveValue.h:186: error: ‘WebCore::CSSPrimitiveValue::CSSPrimitiveValue(T) [with T = CSSValueID]’ is private ../../WebCore/css/CSSImageValue.cpp:40: error: within this context make: *** [out/Release/obj.target/webcore/../../WebCore/css/CSSImageValue.o] Error 1 make: *** Waiting for unfinished jobs....
Lucas De Marchi
Comment 6 2010-08-23 07:45:29 PDT
Closing, since it's not happening anymore.
Note You need to log in before you can comment on or make changes to this bug.