[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjump
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it |
Date: |
Tue, 13 Feb 2007 22:28:07 +0100 |
User-agent: |
Mutt/1.5.11 |
As Anatoly Sokolov wrote:
> I would prefer to correspond to 'C' standard completely, but we are
> ready to pay such price, for that that function 'main()' to be
> callable?
That's I would like to have that as a command-line option. We
definately should adhere to the C standard by default, but by
suggesting the users to use an option like -momit-mainframe (:-), they
can adjust it to the current behaviour. Documentation needs to
clarify the implications of using that option.
As for suggesting that to the users, I think the Makefile templates
(WinAVR, Mfile, AVR Studio Makefile generation) are already doing a
good enough job, so many users probably wouldn't notice it at all.
So far, I've seen a couple of users (maybe) complaining on
avrfreaks.net, not more, and in that case, it's already been the
pathological case you've been quoting.
Of course, if the command-line option is impossible for some reason
(e.g. since it would make the RTL too complicated or whatever), we
really have to see whether standards conformance or code bloat is more
important for us.
Back to the topic of that bug report: As the library does not know
whether the compiler has been generating a main() with a RET at the
end or not, it was my suggestion that the library really always calls
main(), and feeds its return value into exit(), as the cost for this
is minimal (2 to 4 bytes of ROM, and 2 or 3 bytes of stack). Of
course, should we completely decide against a callable main() (even as
a compiler option), we don't need to do that.
--
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] [bug #19050] gcrt1.S should call main rather than jumping to it, Joerg Wunsch, 2007/02/13
- [avr-libc-dev] [bug #19050] gcrt1.S should call main rather than jumping to it, Joerg Wunsch, 2007/02/13
- [avr-libc-dev] [bug #19050] gcrt1.S should call main rather than jumping to it, Anatoly Sokolov, 2007/02/13
- RE: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Eric Weddington, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Anatoly Sokolov, 2007/02/13
- RE: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Eric Weddington, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Joerg Wunsch, 2007/02/13
- RE: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Eric Weddington, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Anatoly Sokolov, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Björn Haase, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it,
Joerg Wunsch <=
- RE: [avr-libc-dev] [bug #19050] gcrt1.S should call main ratherthanjumping to it, Eric Weddington, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main ratherthanjumping to it, Joerg Wunsch, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Bob Paddock, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Alexey Boyko, 2007/02/14
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Marek Michalkiewicz, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main rather thanjumping to it, Björn Haase, 2007/02/13
- RE: [avr-libc-dev] [bug #19050] gcrt1.S should call main ratherthanjumping to it, Eric Weddington, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main ratherthanjumping to it, Marek Michalkiewicz, 2007/02/13
- Re: [avr-libc-dev] [bug #19050] gcrt1.S should call main ratherthanjumping to it, David Brown, 2007/02/14
- RE: [avr-libc-dev] [bug #19050] gcrt1.S should call mainratherthanjumping to it, Eric Weddington, 2007/02/14