This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: G++ static assignment / initialization
- To: law at cygnus dot com
- Subject: Re: G++ static assignment / initialization
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Wed, 19 May 1999 00:41:41 -0400
- Cc: Jason Merrill <jason at cygnus dot com>, Mark Mitchell <mark at codesourcery dot com>, egcs at egcs dot cygnus dot com
>>>>> Jeffrey A Law writes:
Jeff> Right. I think I remember several ports needed some tweaking to handle bss,
Jeff> but not common symbols. Maybe the work was never done for the PPC (or I'm
Jeff> getting confused with some other issue :-)
If someone can point me to the necessary changes to handle this, I
would look into it as it is a colossal waste of space.
For instance on AIX, gcc places all of the following into BSS but
g++ places it all into initialized data:
int a;
float b;
char buf[32];
struct {
double x;
short y;
long z;
} S;
Thanks, David
P.S. If anybody can provide some more insight into the static
assignment occurring at runtime instead of compile time, I would
appreciate it.