Using `const int' values to size stack arrays

Daniel Towner daniel.towner@picochip.com
Wed Nov 17 15:44:00 GMT 2004


>>
> what version of gcc is your port based on? Does the current development
> tree do better?

Its based on 3.4.0. I've run the same example through 3.4.3 on the x86 
port and it doesn't seem to do any better.

> I notice that MAX_VAL has been placed in .data, not .rodata -- is that
> your port, or does GCC not think it constant? 

Hmm. Not sure. I haven't told the port that the .rodata section exists, 
so maybe it defaults to .data?

regards,

dan.

============================================================================
Daniel Towner
picoChip Designs Ltd., Riverside Buildings, 108, Walcot Street, BATH,
BA1 5BG
daniel.towner@picochip.com
07786 702589 




More information about the Gcc mailing list