In light of the Apple's recent goto fail, I've decided to add -Wunreachable-code to existing LLVM flags (-Wall and -Wextra). However, the flag doesn't (seem to) work. For example, placing code after return; doesn't trigger the warning. Is the flag even functional (GCC supposedly removed it)? What am I missing?

有帮助吗?

解决方案

It works for me when:

  1. I enter the flag here warning setting
  2. Then clean project
  3. I receive this warning when I do a rebuild warning output
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top