I tried to compile LLD using gcc 7.1.0 and got 2 warnings:
[1/3] Building CXX object tools/lld/ELF/CMakeFiles/lldELF.dir/Target.cpp.o /home/umb/LLVM/llvm/tools/lld/ELF/Target.cpp: In member function ‘virtual void lld::elf::{anonymous}::ARMTargetInfo::relocateOne(uint8_t*, uint32_t, uint64_t) const’: /home/umb/LLVM/llvm/tools/lld/ELF/Target.cpp:1897:5: warning: this statement may fall through [-Wimplicit-fallthrough=] if ((read32le(Loc) & 0xfe000000) == 0xfa000000) ^~ /home/umb/LLVM/llvm/tools/lld/ELF/Target.cpp:1903:3: note: here case R_ARM_JUMP24: ^~~~ /home/umb/LLVM/llvm/tools/lld/ELF/Target.cpp:1935:14: warning: this statement may fall through [-Wimplicit-fallthrough=] write16le(Loc + 2, (read16le(Loc + 2) & ~0x1000) | (Val & 1) << 12); ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/umb/LLVM/llvm/tools/lld/ELF/Target.cpp:1938:3: note: here case R_ARM_THM_JUMP24: ^~~~
Them can be fixed easily. GCC wants to see "fallthrough" word in a comment that has nothing else. People in the web also uses "/* FALLTHRU */" comment for that. Way used in this patch looks to be consistent with rest LLVM code. Patch fixes the warnings for me.