"Weddington, Eric" <eric.wedding...@atmel.com> wrote: > I'm on the gcc list. I would be very surprised if no one has noticed > this behaviour, especially the CodeSourcery folks. Since it hasn't > been brought up before, this is why I figure it is not a bug.
I don't accept that reasoning :), just because nobody notices something doesn't mean it isn't a bug. Remember, this is a combination of two rarely used options: zero-length arrays outside their main purpose (to emulate a variable-length array at the end of a struct before C99 standardized them), and global uninitialized data outside a common section. Even then, someone would have to really notice that the supposed to be zero-length variable has been assigned a length of > 0. Anyway, I tried to follow the code path in GCC, but cannot really make my way through all of the variable allocation stuff. common and nocommon variables go a very different path beyond a certain point when generating the assembly code. It seems likely to me that it is purely intentional that there is some kind of minimal variable size emitted in nocommon mode. In order to really know, the question would have to be asked on the GCC developers list, in the hope to find someone more acquainted with how all the variable allocation does work. I still think even if it's not a bug but an artifact of the way variable allocation is done, at the very least it lacks a clear statement in the documentation. That alone might warrant a bug report. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list