Last Comment Bug 535861 - LInsHashKind iteration can trigger compiler warnings
: LInsHashKind iteration can trigger compiler warnings
Status: RESOLVED FIXED
[build_warning] fixed-in-nanojit, fix...
:
Product: Core Graveyard
Classification: Graveyard
Component: Nanojit (show other bugs)
: unspecified
: ARM Other
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks: buildwarning
  Show dependency treegraph
 
Reported: 2009-12-18 12:51 PST by Steven Johnson
Modified: 2014-03-17 08:00 PDT (History)
1 user (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch (437 bytes, patch)
2009-12-18 12:54 PST, Steven Johnson
edwsmith: review+
Details | Diff | Review

Description Steven Johnson 2009-12-18 12:51:58 PST
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.
Comment 1 Steven Johnson 2009-12-18 12:54:16 PST
Created attachment 418416 [details] [diff] [review]
Patch
Comment 2 Edwin Smith 2009-12-21 18:18:43 PST
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.
Comment 3 Steven Johnson 2009-12-21 18:31:57 PST
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.
Comment 5 Steven Johnson 2009-12-22 17:01:23 PST
tr: http://hg.mozilla.org/tamarin-redux/rev/cb0764ed5714
Comment 6 Ed Morley [:emorley] 2011-07-09 06:03:01 PDT
(Fixed 18 months ago)
http://hg.mozilla.org/mozilla-central/rev/fbf83c1515fa

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