Closed Bug 525205 Opened 15 years ago Closed 15 years ago

layout/style/nsStyleAnimation.cpp failed to compile with Sun Studio and gcc 4.0

Categories

(Core :: CSS Parsing and Computation, defect)

All
Solaris
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: ginnchen+exoracle, Assigned: dbaron)

References

Details

Attachments

(1 file, 3 obsolete files)

"../../../layout/style/nsStyleAnimation.cpp", line 516: Error: Pointer type needed instead of nsAutoPtr<nsCSSValuePair>. "../../../layout/style/nsStyleAnimation.cpp", line 516: Error: Pointer type needed instead of nsAutoPtr<nsCSSValuePair>. "../../../layout/style/nsStyleAnimation.cpp", line 522: Error: Pointer type needed instead of nsAutoPtr<nsCSSValuePair>. "../../../layout/style/nsStyleAnimation.cpp", line 522: Error: Pointer type needed instead of nsAutoPtr<nsCSSValuePair>. 4 Error(s) detected.
Attached patch patch (obsolete) — Splinter Review
Attachment #409056 - Flags: review?(dbaron)
This is ugly. Would it also fix the error if you defined an operator->* on nsAutoPtr<T>, i.e.: template<class U> U& operator->*(U T::* aMember) { return get()->*aMember; } as a public member of nsAutoPtr<T>?
(And if that doesn't work, what error do you get?)
People are also seeing this on gcc 4.0.1: /Users/moztest/comm/main/src/mozilla/layout/style/nsStyleAnimation.cpp:516: error: no match for ‘operator->*’ in ‘result ->* member’ /Users/moztest/comm/main/src/mozilla/layout/style/nsStyleAnimation.cpp:522: error: no match for ‘operator->*’ in ‘result ->* member’
Attached patch patch to nsAutoPtr and nsRefPtr (obsolete) — Splinter Review
This fixes the error on gcc 4.0.1, per smontagu. I didn't add to nsAutoArrayPtr, even though it has an operator->; I think it probably shouldn't have that operator->, but that's more than I want to attack right now.
Assignee: ginn.chen → dbaron
Attachment #409056 - Attachment is obsolete: true
Attachment #409101 - Flags: review?(benjamin)
Attachment #409056 - Flags: review?(dbaron)
Attached patch patch to nsAutoPtr and nsRefPtr (obsolete) — Splinter Review
This one compiles on Windows, and is better anyway.
Attachment #409101 - Attachment is obsolete: true
Attachment #409159 - Flags: review?(benjamin)
Well, except some of the Windows tinderboxes hit an ICE compiling TestWinTSF.cpp with that version. Maybe I should just #ifndef _MSC_VER.
And it would also be good to know whether this patch actually fixes the error on Sun Studio.
Yes, it works with Sun Studio. Thanks!
I'm planning to land this shortly, since it fixes broken builds for a bunch of people, but I'm still hoping for after-the-fact review.
Attachment #409159 - Attachment is obsolete: true
Attachment #409272 - Flags: review?(benjamin)
Attachment #409159 - Flags: review?(benjamin)
Summary: layout/style/nsStyleAnimation.cpp failed to compile with Sun Studio → layout/style/nsStyleAnimation.cpp failed to compile with Sun Studio and gcc 4.0
Comment on attachment 409272 [details] [diff] [review] patch to nsAutoPtr and nsRefPtr bah, that's ugly, but that's C++ for you
Attachment #409272 - Flags: review?(benjamin) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: