Closed Bug 1266809 Opened 4 years ago Closed 4 years ago

"mozalloc.h: 'operator new': non-member operator new or delete functions may not be declared inline" error with WAE and VisualStudio 2015 Update 2

Categories

(Core :: JavaScript Engine, defect)

Unspecified
Windows
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1261719 +++

Bug 1261719 and https://hg.mozilla.org/mozilla-central/rev/542411a64ac4 disabled warning 4595 in old-configure.in but not in js/src/old-configure.in. We get the same warnings turned into errors when building with vs2015u2.

 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(184): error C2220: warning treated as error - no 'object' file generated
 17961 
 10:20:41     INFO -  Warning: C4595 in c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla\mozalloc.h: 'operator new': non-member operator new or delete functions may not be declared inline
 17962 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(184): warning C4595: 'operator new': non-member operator new or delete functions may not be declared inline
 17963 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(184): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
 17964 
 10:20:41     INFO -  Warning: C4595 in c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla\mozalloc.h: 'operator new': non-member operator new or delete functions may not be declared inline
 17965 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(190): warning C4595: 'operator new': non-member operator new or delete functions may not be declared inline
 17966 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(190): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
 17967 
 10:20:41     INFO -  Warning: C4595 in c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla\mozalloc.h: 'operator new[]': non-member operator new or delete functions may not be declared inline
 17968 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(196): warning C4595: 'operator new[]': non-member operator new or delete functions may not be declared inline
 17969 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(196): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
 17970 
 10:20:41     INFO -  Warning: C4595 in c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla\mozalloc.h: 'operator new[]': non-member operator new or delete functions may not be declared inline
 17971 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(202): warning C4595: 'operator new[]': non-member operator new or delete functions may not be declared inline
 17972 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(202): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
 17973 
 10:20:41     INFO -  Warning: C4595 in c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla\mozalloc.h: 'operator delete': non-member operator new or delete functions may not be declared inline
 17974 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(208): warning C4595: 'operator delete': non-member operator new or delete functions may not be declared inline
 17975 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(208): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
 17976 
 10:20:41     INFO -  Warning: C4595 in c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla\mozalloc.h: 'operator delete': non-member operator new or delete functions may not be declared inline
 17977 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(214): warning C4595: 'operator delete': non-member operator new or delete functions may not be declared inline
 17978 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(214): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
 17979 
 10:20:41     INFO -  Warning: C4595 in c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla\mozalloc.h: 'operator delete[]': non-member operator new or delete functions may not be declared inline
 17980 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(220): warning C4595: 'operator delete[]': non-member operator new or delete functions may not be declared inline
 17981 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(220): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
 17982 
 10:20:41     INFO -  Warning: C4595 in c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla\mozalloc.h: 'operator delete[]': non-member operator new or delete functions may not be declared inline
 17983 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(226): warning C4595: 'operator delete[]': non-member operator new or delete functions may not be declared inline
 17984 
 10:20:41     INFO -  c:\builds\moz2_slave\try-w64-0000000000000000000000\build\src\obj-firefox\dist\include\mozilla/mozalloc.h(226): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
 17985 
 10:20:41     INFO -  c:/builds/moz2_slave/try-w64-0000000000000000000000/build/src/config/rules.mk:934: recipe for target 'Unified_cpp_js_src_shell0.obj' failed
C4595 is "'operator new': non-member operator new or delete functions
may not be declared inline". This warning is already suppressed for newer
versions of clang and is already suppressed in old-configure.in (see
542411a64ac4 and bug 1261719).

Review commit: https://reviewboard.mozilla.org/r/48529/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/48529/
Attachment #8744411 - Flags: review?(ted)
Comment on attachment 8744411 [details]
MozReview Request: Bug 1266809 - Suppress MSVC warning C4595; r?ted

https://reviewboard.mozilla.org/r/48529/#review45237
Attachment #8744411 - Flags: review?(ted) → review+
https://hg.mozilla.org/mozilla-central/rev/83a3c6e64690
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.