Details
-
Improvement
-
Resolution: Fixed
-
Major - P3
-
None
-
Fully Compatible
-
Service Arch 2021-05-31
Description
The documentation for MONGO_UNREACHABLE seems to be a legacy artifact from back when MONGO_COMPILER_UNREACHABLE and MONGO_UNREACHABLE diverged 5 years ago.
"The purpose of this macro is to instruct the compiler that a line of code will never be reached. ... "
What the MONGO_UNREACHABLE macro does, while valuable, ain't this. This is what MONGO_COMPILER_UNREACHABLE does. MONGO_UNREACHABLE effectively has no documentation describing its true effects. This is concerning because we use it a lot in switch statements.