As Eric Weddington wrote: > Joerg, what do you think of this? Time to revisit the atmega256x > patch?
Well, maybe. I suggest we change gcrt1.S anyway: if we are not going to place the additional infinite loop behind itx, the only cost for doing so is a single CALL/RCALL plus the two (or three for the ATmega256x) bytes on the stack. As we already do have compilers around right now that treat main() as a normal function, this would simply get us onto the safe side avr-libc-wise. In general, I agree with Anatoly's argumentation. However, I believe the C standard would require main() to be callable, so ideally the treatment of main() should be an option, and it should even default to being enabled (like we do for -mint8, although the consequences aren't so drastic as in the -mint8 case). In case we should ever implement 64-bit floats, I'd also like to see them being the default (for standards conformance reasons), with some option (say, -mdouble32) to revert to the current behaviour. Btw., part of treating main() as a normal function was to remove the obsolete initialization of the stack pointer at the beginning of main()(when it's actually being already initialized early in .init2). I don't know whether that's alredy default GCC behaviour, or also came from Bjoern's ATmega256x patch. Also, we should certainly ask Bjoern for any comments. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) _______________________________________________ AVR-libc-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-libc-dev
