LInsHashKind iteration can trigger compiler warnings

RESOLVED FIXED

Status

Core Graveyard
Nanojit
RESOLVED FIXED
8 years ago
4 years ago

People

(Reporter: Steven Johnson, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning] fixed-in-nanojit, fixed-in-tamarin)

Attachments

(1 obsolete attachment)

(Reporter)

Description

8 years ago
The idiom

    for (LInsHashKind kind = LInsFirst; kind <= LInsLast; kind = nextKind(kind)) 

will trigger

    comparison is always true due to limited range of data type

warnings/errors dependings on compiler configuration.
(Reporter)

Comment 1

8 years ago
Created attachment 418416 [details] [diff] [review]
Patch
Attachment #418416 - Flags: review?(edwsmith)

Comment 2

8 years ago
Comment on attachment 418416 [details] [diff] [review]
Patch

"compilers that will insist..." is heresay and spreads fear, uncertianty, and doubt... the comment should say what compiler it is, so later we can re-check whether the hack is still needed.
Attachment #418416 - Flags: review?(edwsmith) → review+
(Reporter)

Comment 3

8 years ago
I wrote "will trigger... warnings/errors depending on compiler configuration", "compilers will insist"... :-)

For the record, it was a variant of gcc 4.4 building for Android; I'm guessing (without proof) that any gcc 4.4 variant can be persuaded to complain in similar fashion if you configure its warning level in a similarly anal-retentive manner.
(Reporter)

Comment 4

8 years ago
Comment on attachment 418416 [details] [diff] [review]
Patch

nj-c: http://hg.mozilla.org/projects/nanojit-central/rev/e2a738ba767e
Attachment #418416 - Attachment is obsolete: true
(Reporter)

Comment 5

8 years ago
tr: http://hg.mozilla.org/tamarin-redux/rev/cb0764ed5714
(Reporter)

Updated

8 years ago
Whiteboard: fixed-in-nanojit, fixed-in-tamarin

Updated

8 years ago
Component: JIT Compiler (NanoJIT) → Nanojit
Product: Tamarin → Core
QA Contact: nanojit → nanojit
Target Milestone: --- → Future

Comment 6

6 years ago
(Fixed 18 months ago)
http://hg.mozilla.org/mozilla-central/rev/fbf83c1515fa
Blocks: 187528
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-nanojit, fixed-in-tamarin → [build_warning] fixed-in-nanojit, fixed-in-tamarin
Target Milestone: Future → ---
(Assignee)

Updated

4 years ago
Component: Nanojit → Nanojit
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.