This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fzero-initialized-in-bss again
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: geoffk at geoffk dot org, gcc at gcc dot gnu dot org
- Date: 03 May 2004 22:13:55 +0200
- Subject: Re: -fzero-initialized-in-bss again
- Organization: Integrable Solutions
- References: <10405031800.AA23745@vlsi1.ultra.nyu.edu>
kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
| > What we are discussing is what object file section each variable
| > should go into. And what I'm saying is that this shouldn't depend on
| > whether a variable was written in C or Ada: it should only be a function
| > of language-independent attributes.
|
| This statement really doesn't make sense to me. It's like saying that
| what section a variable goes into should be the same between C and
| C++; if it was true, then we should be able to delete thousands of
| lines from the C++ frontend that are concerned with section and
| linkage selection.
|
| Not really. What I was trying to say is that the goal is to make Ada and C
| as compatible as possible in terms of data layout.
I don't dispute that. However, there out to be a distinction between
layout and *linkage*. The C language has a very simply-minded model
of linkage. What people have been saying is that, it is the other
front-ends' responsability to make sure that their mapping to the C
linkage model is done right. It does not make much sense to say that
layout compatibility ought to imply linkage compatibility. The C++
front-end, for example, tries to be as layout compatible as possible
with C where it makes sense, but it is very careful about the linkage
mapping.
-- Gaby