#130 automatic --main-return

open
nobody
None
1
2016-03-28
2006-04-26
No

SDCC should automatically assume --main-return if
"main" has an endless loop.
Saves two byte code and more importantly 2 bytes idata.

void main(void)
{
while(1)
;
}

Discussion

  • mrx23dot

    mrx23dot - 2016-03-28

    Guess you mean --main-no-return.
    Is this even implemented as function attribute?
    Loop could also be for(;;){}

     
  • Philipp Klaus Krause

    We have the _Noreturn keyword.
    
    Philipp
    
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks