[SERVER-55139] Fix documentation for MONGO_UNREACHABLE Created: 10/Mar/21 Updated: 29/Oct/23 Resolved: 24/May/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Billy Donahue | Assignee: | Luis Osta (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | servicearch-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Service Arch 2021-05-31 |
| Participants: |
| 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.
|
| Comments |
| Comment by Githook User [ 24/May/21 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: |