Am 14.03.2011 23:17, schrieb Rick Jenkins: > As J.M. Gross points out, the extra return address for main() occupies stack > for no good reason. In a microcontroller it is madness for main() to return, > since it has nothing to which it can return. Accordingly, main() will either > be written as an infinite loop, or as its last action will call a function > with > infinite-loop behaviour.
is gcc respecting the noreturn attribute for main too? (probably not as the startup code is only linked and not compiled). if it would, it could save the two bytes on the stack. > I think we will always need the -mendup-at-main option. This is a small > problem which should be addressed upstream. if you write main as an infinite loop, why do you need this? chris ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Mspgcc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mspgcc-users
