avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] Avr-gcc's main() *is* a callable function.


From: Dmitry K.
Subject: [avr-libc-dev] Avr-gcc's main() *is* a callable function.
Date: Thu, 15 Feb 2007 16:20:44 +1000
User-agent: KMail/1.5

Hi.

I believe, from the point of view of the Standard, current
realization of main() function is callable.  Really, the
programmer can use the "return" operator to leave main()
function.  For example, it is possible and really works:

   int main() {
      if (foo()) return 1;
      for (;;) ;
   }

Yes, in this example the operator "return" is realized
with use of a "rjmp" command.  But it already outside of
the competence of the Standard.

Dmitry.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]