Closed Bug 361058 Opened 13 years ago Closed 13 years ago

gcc2.95.3 fails to compile nsListBoxBodyFrame.cpp

Categories

(Core :: Layout, defect, blocker)

Other
BeOS
defect
Not set
blocker

Tracking

()

RESOLVED FIXED

People

(Reporter: thesuckiestemail, Assigned: smaug)

References

Details

(Keywords: regression, verified1.8.0.9, verified1.8.1.1)

Attachments

(1 file)

Bug 258513 broke compilation for gcc2.95.3 under BeOS, but maybe others as well.

The lines:
      return mTopFrame->IsBoxFrame() ? mTopFrame : nsnull;
needs to be changed to:
      return mTopFrame->IsBoxFrame() ? (nsIBox*) mTopFrame : nsnull;

Or it will stop on ambigous candidates.
Attached patch Suggested patchSplinter Review
r?
Attachment #245845 - Flags: review?(bryner)
The same error also occurs with Sun's compiler:
http://tinderbox.mozilla.org/SeaMonkey-Ports/

It's a regression from bug 360642.
Blocks: 360642
Keywords: regression
Comment on attachment 245845 [details] [diff] [review]
Suggested patch

not doing reviews, sorry.  please ask one of the module owners listed on http://www.mozilla.org/owners.html
Attachment #245845 - Flags: review?(bryner)
hrm, buggy compilers...
Does the patch fix both beos and sun?
Comment on attachment 245845 [details] [diff] [review]
Suggested patch

I'll check this in if you roc can r+sr
Attachment #245845 - Flags: superreview?(roc)
Attachment #245845 - Flags: review?(roc)
Comment on attachment 245845 [details] [diff] [review]
Suggested patch

Use NS_STATIC_CAST
Attachment #245845 - Flags: superreview?(roc)
Attachment #245845 - Flags: superreview+
Attachment #245845 - Flags: review?(roc)
Attachment #245845 - Flags: review+
Checked in.
tgh, if you can now compile nsListBoxBodyFrame.cpp, please mark this
FIXED.
Needed on branches if bug 360642 is taken
Assignee: nobody → Olli.Pettay
Flags: blocking1.8.1.1+
Flags: blocking1.8.0.9+
Comment on attachment 245845 [details] [diff] [review]
Suggested patch

approved for 1.8/1.8.0 branches, a=dveditz
Attachment #245845 - Flags: approval1.8.1.1+
Attachment #245845 - Flags: approval1.8.0.9+
I can't verify this completly because bug 313309 dropped support for gcc2.9. I think this bug is fixed though.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
v.fixed based on code inspection, reporter comments, and the fact that this has been fixed for a while without anyone screaming about it. :-)  If anyone still has compilation issues, please let us know.
You need to log in before you can comment on or make changes to this bug.