-
Type:
Improvement
-
Status: Closed
-
Priority:
Major - P3
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Internal Code
-
Labels:None
-
Backwards Compatibility:Fully Compatible
-
Backport Completed:
-
Sprint:Platform 3 05/15/15
The current MONGO_COMPILER_UNREACHABLE simply uses __builtin_unreachable, however if control does flow past it then the behavior is undefined.
We would prefer to terminate. We should write a new macro MONGO_UNREACHABLE, that invokes invariantFailed or similar. Optionally, the macro could follow that call to invariantFailed with __builtin_unreachable, however this should probably be unnecessary, as whatever function is called by the macro should be tagged noreturn.
- is duplicated by
-
SERVER-18343 'control reaches end of non-void function' error in storeLocalLastVoteDocument (gcc)
-
- Closed
-