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

declaration of main [was: test build of 4.9 started]



On Monday 09 March 2009 20:02:20 Joel Sherrill wrote:
> It would be better to match C99 though if we can
> get a definitive answer.

 The ISO/IEC 9899:TC2 Committee Draft of May 6, 2005 specifies in section 
5.1.2.2.1 (Program startup) that main() must not be declared be the 
implementation, and must be defined as
  int main(void) { /* ... */ }
or
  int main(int argc, char *argv[]) { /* ... */ }
or in some other implementation-defined manner.

 In other words, C99 allows it if RTEMS allows it.

 Regards,
 Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  D206 D44B 5155 DF98 550D  3F2A 2213 88AA A1C7 C933