arsenm added a comment. It's undefined to be out of bounds value. Clang warns when there is a default when all enum values are covered. It won't warn on the non void here because it won't reach there. I think you have to move the unreachable after the switch and remove default http://reviews.llvm.org/D21701