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

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 12 23:46:12 PST 2016


On Sat, Mar 12, 2016 at 11:27 PM, Joerg Sonnenberger <
joerg at britannica.bec.de> wrote:

> 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.
>

In that sense this linker option is redundant, no?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160312/a029a770/attachment.html>


More information about the llvm-commits mailing list