[PATCH] D17998: [ELF] implement --warn-common/--no-warn-common

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 12 23:27:32 PST 2016


On Sat, Mar 12, 2016 at 06:42:38PM -0800, Rui Ueyama wrote:
> Looking into it and I found that this patch seems desirable. I think the
> use case of this option is to catch any programmer's error to forget to add
> "extern" to uninitialized global variables. They are usually silently
> merged by the linker because they are common symbols, but you often want to
> avoid that default behavior and do rigorous error checking. This option is
> useful for that. In that case you want to find any common duplicate common
> symbols regardless of their sizes.

But that's already better served by -fno-common in the compiler.

Joerg


More information about the llvm-commits mailing list