A question about the global variables initialization.

2005-12-20 Thread Eric Fisher
Hi, I guess it's about the gcc version. Gcc 3.4.4 does put the zero'd variables into bss section. But I'd like to know if the older one does it too. Say 2.95.2 19991024 (release)? Thanks again. Eric.

Re: A question about the global variables initialization.

2005-12-19 Thread Steven Bosscher
On Dec 20, 2005 08:17 AM, Eric Fisher <[EMAIL PROTECTED]> wrote: > >Yes for zero'd initialized variables, GCC puts them into BSS to say > >space in the executable. > > Thanks. But, you say 'to say space in the executable'. I'm not clear > what does it mean. "save space".   Gr. Steven    

A question about the global variables initialization.

2005-12-19 Thread Eric Fisher
>Yes for zero'd initialized variables, GCC puts them into BSS to say >space in the executable. Thanks. But, you say 'to say space in the executable'. I'm not clear what does it mean. Eric.

Re: A question about the global variables initialization.

2005-12-19 Thread Andrew Pinski
On Dec 20, 2005, at 2:02 AM, Eric Fisher wrote: Hello, For such a program, int a=0; int main(void) { ... } We will see the compiler put the variable 'a' into the bss section. That means that 'a' is a non-initialized variable. I don't know if this is the gcc's strategy. Yes for zero'd initi

A question about the global variables initialization.

2005-12-19 Thread Eric Fisher
Hello, For such a program, int a=0; int main(void) { ... } We will see the compiler put the variable 'a' into the bss section. That means that 'a' is a non-initialized variable. I don't know if this is the gcc's strategy. Happy Christmas. Eric.