Solaris Studio 12 Compilers on Solaris 10 enforce strong type checking on ternary operators: Error: Ambiguous "?:" expression, second operand of type "WTF::PassRefPtr<WebCore::DocumentFragment>" and third operand of type "int" can be converted to one another. Error: Ambiguous "?:" expression, second operand of type "WTF::PassRefPtr<JSC::Label>" and third operand of type "int" can be converted to one another. [and others similar]
Created attachment 89918 [details] Patch to fix the mis-matched types in a ternary operation on Solaris 10 with Sun Studio 12 A compile fix for Solaris 10 with Sun Studio 12 CC compiler, ternary operators must have matching types.
Comment on attachment 89918 [details] Patch to fix the mis-matched types in a ternary operation on Solaris 10 with Sun Studio 12 - LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : PassRefPtr<Label>()); // Only loops have continue targets. + LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : PassRefPtr<Label>(0)); // Only loops have continue targets. I don't see this change explained - types already match here.
Created attachment 89947 [details] Fix compilation on Solaris 10 with Sun Studio 12, ternary operators must match types, updated. Updated patch per review (good catch).
Is there not a newer compiler than this one? Does GCC work on Solaris? This particular compiler seems über-lame.
(In reply to comment #4) > Is there not a newer compiler than this one? Does GCC work on Solaris? This particular compiler seems über-lame. gcc has a different ABI from Sun Studio 12/12.1/12.2, which means we either build QT/WebKit/KDE4 from gcc or Sun Studio. Studio happens to be a more stict compiler. I can't use 12.2 because there are compiler failures which are not fixed when compiling QT. The other problem is that unless one has a support contract with Oracle, you can't get the Studio patches for free anymore, and I've been able to build QT/WebKit/KDE4 with SS12 and have it work. Testing the SS12.1 compiler is going to be challenging, because it is a new compiler, not an update of the SS12 compiler. So, new set of bugs. I have 2-3 more Solaris/Studio patches which I will be submitting, then we should be done for a while.
Comment on attachment 89947 [details] Fix compilation on Solaris 10 with Sun Studio 12, ternary operators must match types, updated. Clearing flags on attachment: 89947 Committed r84538: <http://trac.webkit.org/changeset/84538>
All reviewed patches have been landed. Closing bug.