[En-Nut-Discussion] GCC and main

Harald Kipp harald.kipp at egnite.de
Tue Jan 26 20:23:34 CET 2010

Nathan Moore wrote:

> Personally I dislike for main to be anything except:
> int main(void)
> int main(int argc, const char * argv[])
> or
> int main(int argc, const char * argv[], const char * envp[])

No objection here. Right now, only version 1 makes sense for Nut/OS.

> I don't use the
> #define main NutAppMain
> in my code and just call it NutAppMain.

The #define is in arch/arm.h and arch/avr/gcc.h. It makes no difference,
because the compiler will never see main. It's processed by the


More information about the En-Nut-Discussion mailing list