Closed Bug 678051 Opened 13 years ago Closed 12 years ago

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

Categories

(Core Graveyard :: Nanojit, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: espindola, Assigned: espindola)

Details

(Whiteboard: [fixed-in-nanojit])

Attachments

(1 file)

Attached patch fix buildSplinter Review
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+
(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]
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
Closed: 13 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 → ---
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
Status: REOPENED → RESOLVED
Closed: 13 years ago12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-nanojit][inbound] → [fixed-in-nanojit]
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: