lkml.org 
[lkml]   [2000]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] removal of "static foo = 0" from drivers/ide (test11)

[Tigran Aivazian <tigran@veritas.com>]
> no, I was not talking about ISO C standards but about the normal
> expected C environment under any UNIX. I guess, we just mean
> different things by "trivially equivalent" since neither of us said
> anything about what that actually meant. What I meant by that was
> "not only imply the same logic for the program but correspond to the
> same physical locations (if any) on the resulting object file".

OK, so we do mean two different things. As far as standard C is
concerned, the location of your global variables is none of your
business, as long as they can be addressed with a pointer of the
appropriate type. By the time you get to caring about what section
something goes in, you're way beyond standard C, and you need to start
looking at the gcc __attribute__(("section")) extension, and possibly
an ld link script.

So I guess to me "trivially equivalent" meant that a standards-
conforming C program would never notice the difference. As such, I
think -fassume-bss-zero would be an entirely reasonable default for a C
compiler, just as reasonable as reordering globals within a section
(and nobody seems to be questioning gcc's right to do *that*).

It would probably also be reasonable to document it and provide an
option to switch it off.

Peter
-
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.048 / U:8.512 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site