Last Comment Bug 678051 - Fix c++0x initializer list error found by clang
: Fix c++0x initializer list error found by clang
Status: RESOLVED FIXED
[fixed-in-nanojit]
:
Product: Core Graveyard
Classification: Graveyard
Component: Nanojit (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-10 14:11 PDT by Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
Modified: 2014-03-17 08:00 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
fix build (5.07 KB, patch)
2011-08-10 14:11 PDT, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
n.nethercote: review+
Details | Diff | Review

Description Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-08-10 14:11:34 PDT
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.
Comment 1 Nicholas Nethercote [:njn] 2011-08-11 21:49:34 PDT
Which initializer lists?  I wonder if those should be changed to expect 'int'.
Comment 2 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-08-12 08:43:13 PDT
   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 3 Nicholas Nethercote [:njn] 2011-08-12 14:50:41 PDT
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.
Comment 4 Daniel Holbert [:dholbert] 2011-08-15 11:37:30 PDT
(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)
Comment 5 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-08-19 13:40:48 PDT
When can I expect this to land on nanojit-central?
Comment 6 Nicholas Nethercote [:njn] 2011-08-19 15:25:43 PDT
I'll do it early next week.  Sorry for the delay.
Comment 7 Nicholas Nethercote [:njn] 2011-08-21 21:06:00 PDT
http://hg.mozilla.org/projects/nanojit-central/rev/55c10227eece
Comment 8 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2011-08-22 11:07:52 PDT
Nicholas, this fixes the build with clang. Is it possible to backport this patch to m-c?
Comment 9 Marco Bonardo [::mak] 2011-08-24 02:02:50 PDT
http://hg.mozilla.org/mozilla-central/rev/90144e453538
Comment 10 Nicholas Nethercote [:njn] 2011-08-24 02:41:51 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/90144e453538
Comment 11 Nicholas Nethercote [:njn] 2011-08-24 02:43:10 PDT
Reopening because this hasn't landed on tamarin-redux.
Comment 12 Tamarin Bot 2011-10-10 17:36:38 PDT
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

Note You need to log in before you can comment on or make changes to this bug.