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

Arnout Vandecappelle arnout at
Tue Mar 10 17:10:07 UTC 2009

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 (Program startup) that main() must not be declared be the 
implementation, and must be defined as
  int main(void) { /* ... */ }
  int main(int argc, char *argv[]) { /* ... */ }
or in some other implementation-defined manner.

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

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

More information about the users mailing list