[webkit-dev] Patch for compilation error while building with gcc < 4.x compilers on latest nightlies

Srinivas Rao M Hamse msrinirao at gmail.com
Mon Apr 14 23:31:34 PDT 2008


Thanks Darin & David for inputs.

Patches for review should go in bugs.webkit.org, but I think it's worth
> mentioning a couple problems I see immediately.
>
> This incorrectly removes the "protected" for non-GCC compilers and in fact
> may not even compile there because __GNUC__ is not defined and there's no
> check of it. And the check here says "> 4", which means the protected is
> included only for GCC 5 and newer.
>
>    -- Darin
>

I have logged this issue here:
https://bugs.webkit.org/show_bug.cgi?id=18507

Please review the attached patch file contents:

--- a/WebKit-r31848/JavaScriptCore/kjs/nodes.h  2008-04-12
04:28:00.000000000 +0530
+++ b/WebKit-r31848/JavaScriptCore/kjs/nodes.h  2008-04-14
19:04:26.000000000 +0530
@@ -207,7 +207,9 @@
         // Used to optimize those nodes that do extra work when returning a
result, even if the result has no semantic relevance
         virtual void optimizeForUnnecessaryResult() { }

+#if !COMPILER(GCC) || (COMPILER(GCC) && __GNUC__ >= 4)
     protected:
+#endif
         typedef enum { EvalOperator, FunctionCall } CallerType;
         template <CallerType, bool> inline JSValue*
resolveAndCall(ExecState*, const Identifier&, ArgumentsNode*, size_t = 0);
     };


regards,
Srinivas Rao. M
-- 
Srinivas Rao M Hamse <http://msrinirao.blogspot.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20080415/232ccec7/attachment.html


More information about the webkit-dev mailing list