Fix c++0x initializer list error found by clang

RESOLVED FIXED

Status

Core Graveyard
Nanojit
RESOLVED FIXED
6 years ago
3 years ago

People

(Reporter: espindola, Assigned: espindola)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed-in-nanojit])

Attachments

(1 attachment)

Created attachment 552210 [details] [diff] [review]
fix build

Fix the build with clang in c++0x mode.
    
    Change the function msbSet32, lsbSet32, lsbSet64, msbSet64 to return
    unsigned ints. They are used in initializer lists that expect unsigned
    values.
Attachment #552210 - Flags: review?(mh+mozilla)
Attachment #552210 - Flags: review?(mh+mozilla) → review?(nnethercote)
Which initializer lists?  I wonder if those should be changed to expect 'int'.
   Register r = { (sizeof(RegisterMask) == 4) ? lsbSet32(mask) : lsbSet64(mask) }

in RegAlloc.h. Register is defined as

    struct Register {
        uint32_t n;     // the register number
    };

Do you think that should be a signed value?
Comment on attachment 552210 [details] [diff] [review]
fix build

Review of attachment 552210 [details] [diff] [review]:
-----------------------------------------------------------------

(In reply to Rafael Ávila de Espíndola (:espindola) from comment #2)
>
> Do you think that should be a signed value?

It probably doesn't matter, really.

This has to land on nanojit-central, I'll do it on Monday.
Attachment #552210 - Flags: review?(nnethercote) → review+
Keywords: checkin-needed
(In reply to Nicholas Nethercote [:njn] from comment #3)
> This has to land on nanojit-central, I'll do it on Monday.

(adding whiteboard chunk to hopefully keep anyone from landing this on m-c)
Whiteboard: [checkin-needed for nanojit-central]

Updated

6 years ago
Assignee: nobody → respindola
When can I expect this to land on nanojit-central?
I'll do it early next week.  Sorry for the delay.
http://hg.mozilla.org/projects/nanojit-central/rev/55c10227eece
Keywords: checkin-needed
Whiteboard: [checkin-needed for nanojit-central] → [fixed-in-nanojit]
Nicholas, this fixes the build with clang. Is it possible to backport this patch to m-c?
http://hg.mozilla.org/mozilla-central/rev/90144e453538
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
http://hg.mozilla.org/integration/mozilla-inbound/rev/90144e453538
Whiteboard: [fixed-in-nanojit] → [fixed-in-nanojit][inbound]
Reopening because this hasn't landed on tamarin-redux.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Comment 12

6 years ago
changeset: 6623:01094d3204f6
user:      Rafael Ávila de Espíndola <respindola@mozilla.com>
summary:   Bug 678051 - Fix c++0x initializer list error found by clang.  r=nnethercote.

http://hg.mozilla.org/tamarin-redux/rev/01094d3204f6

Updated

5 years ago
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-nanojit][inbound] → [fixed-in-nanojit]
Component: Nanojit → Nanojit
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.