-
Type: Task
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Build
-
Server Development Platform
-
Fully Compatible
We have a fair number of compiler warnings that we disable, often checking whether the compiler honors the flag with AddToXXXFlagsIfSupported. Currently, that list is:
- -Wno-unused-local-typedefs
- -Wno-unused-function
- -Wno-unused-private-field
- -Wno-deprecated-declarations
- -Wno-unused-const-variable
- -Wno-unused-but-set-variable
- -Wno-missing-braces
- -Wno-inconsistent-missing-override
- -Wno-potentially-evaluated-expression
Some of these flags were added to work around compiler bugs in older versions of GCC or clang, however, we now have compiler minima that are newer than those buggy versions. Others were set to work around bugs or flaws in particular versions of third parth libraries that we use (v8, boost), but in some cases we are now using a newer version of that library, or are replaceing the library entirely. Finally, in other cases, the flag is really only needed for the third_party directory, but we apply it to src/mongo as well, weakening our error checking.
We should audit these flags after our next boost ugprade and a potential switch to SpiderMonkey, and remove those that are no longer required with our compilers or libraries, and scope the ones that are necessary as narrowly as possible.