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

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 13 00:10:51 PST 2016


Is there any case you want to use --warn-common option when linking Fortran
programs?

On Sun, Mar 13, 2016 at 12:08 AM, Joerg Sonnenberger via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On Sat, Mar 12, 2016 at 11:46:12PM -0800, Rui Ueyama via llvm-commits
> wrote:
> > 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?
>
> It is exactly still useful for dealing with Fortran :)
>
> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160313/209c5f9e/attachment.html>


More information about the llvm-commits mailing list