lkml.org 
[lkml]   [2000]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] removal of "static foo = 0"
    From
    Andrea Arcangeli <andrea@suse.de> writes:

    |> On Tue, Nov 28, 2000 at 10:55:06AM +0100, Andreas Schwab wrote:
    |> > Alexander Viro <viro@math.psu.edu> writes:
    |> >
    |> > |> On Tue, 28 Nov 2000, Andrea Arcangeli wrote:
    |> > |>
    |> > |> > On Tue, Nov 28, 2000 at 12:10:33PM +0900, kumon@flab.fujitsu.co.jp wrote:
    |> > |> > > If you have two files:
    |> > |> > > test1.c:
    |> > |> > > int a,b,c;
    |> > |> > >
    |> > |> > > test2.c:
    |> > |> > > int a,c;
    |> > |> > >
    |> > |> > > Which is _stronger_?
    |> > |> >
    |> > |> > Those won't link together as they aren't declared static.
    |> > |>
    |> > |> Try it. They _will_ link together.
    |> >
    |> > Not if you compile with -fno-common, which should actually be the default
    |> > some day, IMHO.
    |>
    |> I thought -fno-common was the default behaviour indeed, and I agree it should
    |> become the default since current behaviour can lead to sublte bugs. (better I
    |> discovered this gcc "extension" this way than after some day of debugging :)

    This is not really a gcc extension, but long Unix tradition. If you make
    -fno-common the default then many programs will not build any more,
    including the Linux kernel. :-)

    Andreas.

    --
    Andreas Schwab "And now for something
    SuSE Labs completely different."
    Andreas.Schwab@suse.de
    SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 12:47    [W:0.022 / U:63.056 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site