On Thursday 20 December 2007 00:53, Weddington, Eric wrote:
> > Because that bug is completely unimportant and purely cosmetical.
> > Real embedded applications don't exit() anyway.  Mind you, we (at
> > least you and me) have been shipping compiler/library combinations
> > where returning from main() didn't jump to or call exit() at all, and
> > people barely noticed it.
[...]

I agree that bug is unimportant and cosmetical. For me it
is no significance is CLI in abort/exit Avr-libc's functions,
or is not.

But I have a few rationales against to keep GCC busy with CLI:

. Yes, the abort() function associates with a rough stop of
work.  But it is not obvious in case of a normal return from
main().  Why and to not finish, for example, transfer of the
buffer on RS-232 by interruptions? (I shall specify, that it
is onle an idea about natural behaviour.)

. The user at an input of main() has received control with
the forbidden interruptions and has enabled them himself.
Means, it is his duty to restore the I-flag at the return,
if it is needed to him.  Roughly, we do not demand from the
compiler to extinguish all LEDs not extinguished by us!

. Reduction of accessible memory even on one word on small
MCUs is completely not indifferent.

Dmitry.



_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to