Disable C4351 when compiling with MSVC, sync up disabled warnings between configure.in and js/src/configure.in

RESOLVED FIXED in mozilla18

Status

RESOLVED FIXED
6 years ago
7 months ago

People

(Reporter: Waldo, Assigned: Waldo)

Tracking

unspecified
mozilla18

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 667080 [details] [diff] [review]
Patch

C4351 warns for this case:

  struct S
  {
    char a[5];
    S() : a() { }
  };

and specifically for the |a()|, which since MSVC 2005 will default-initialize |a|.  That's the standard behavior, and JS has code which expects it, so we should just disable this warning.

I also took the opportunity to slightly clean up the disabled-warnings list for MSVC in both configure scripts.

There's one other warning that JS disables that isn't disabled in the overall configure, but I think it was a mistake to disable C4244, so I'm not adding it right now, and I'd actually like to un-disable it in JS and fix the cases where we hit it.

With this patch compiling the JS shell is again warning-free on Windows in opt builds.
Attachment #667080 - Flags: review?(khuey)
(Assignee)

Comment 1

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/c15883431cbb
Target Milestone: --- → mozilla18
https://hg.mozilla.org/mozilla-central/rev/c15883431cbb
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite-
Resolution: --- → FIXED

Updated

6 years ago
Blocks: 802352

Updated

7 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.