WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
58725
Fix compilation on Solaris 10 with Sun Studio 12: ternary opertors must have matching types
https://bugs.webkit.org/show_bug.cgi?id=58725
Summary
Fix compilation on Solaris 10 with Sun Studio 12: ternary opertors must have ...
Ben Taylor
Reported
2011-04-16 00:11:12 PDT
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]
Attachments
Patch to fix the mis-matched types in a ternary operation on Solaris 10 with Sun Studio 12
(8.63 KB, patch)
2011-04-16 00:45 PDT
,
Ben Taylor
no flags
Details
Formatted Diff
Diff
Fix compilation on Solaris 10 with Sun Studio 12, ternary operators must match types, updated.
(7.15 KB, patch)
2011-04-17 04:03 PDT
,
Ben Taylor
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ben Taylor
Comment 1
2011-04-16 00:45:44 PDT
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.
Alexey Proskuryakov
Comment 2
2011-04-16 23:24:17 PDT
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.
Ben Taylor
Comment 3
2011-04-17 04:03:12 PDT
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).
Eric Seidel (no email)
Comment 4
2011-04-18 10:02:36 PDT
Is there not a newer compiler than this one? Does GCC work on Solaris? This particular compiler seems über-lame.
Ben Taylor
Comment 5
2011-04-18 10:19:44 PDT
(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.
WebKit Commit Bot
Comment 6
2011-04-21 12:27:44 PDT
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
>
WebKit Commit Bot
Comment 7
2011-04-21 12:27:49 PDT
All reviewed patches have been landed. Closing bug.
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