Open Bug 864870 Opened 6 years ago Updated 6 years ago

Reenable narrowing-conversion warnings in MSVC, enable them in clang/gcc

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

People

(Reporter: Waldo, Assigned: Waldo)

References

Details

Attachments

(1 file)

We disabled them awhile back in bug 610480 because we thought they were spammy-ish.  But really, they kinda point out issues.  We should fix any instances of the problems, then reenable.  (Or enable, as the case is, for clang/gcc -- -Wconversion, -Wshorten-64-to-32.)

It might be a good idea at the same time to add some helper methods to perform the casts, that verify the casts are safe to perform.  I've been meaning to add these to mfbt but haven't gotten around to it.  Maybe now, ish, is the time to do that.
Depends on: 865036
The warning-stream this spews with gcc (at least) is kind of incredible.  It'll take some effort to sort through it all.  A bunch of warnings are likely to be in headers, tho, so I imagine the overall volume can be cut substantially with little effort.
Assignee: general → jwalden+bmo
You need to log in before you can comment on or make changes to this bug.