+ /* Special handling for main() */
+ if (strcmp (Func->Name, "main") == 0) {
+ /* Main cannot be a fastcall function */
+ if (IsFastCallFunc (Func->Type)) {
+ Error ("`main' cannot be declared as __fastcall__");
+ }
+
+ /* If main() takes parameters, generate a forced import to a function
+ * that will setup these parameters. This way, programs that do not
+ * need the additional code will not get it.
+ */
+ if (D->ParamCount > 0 || (D->Flags & FD_VARIADIC) != 0) {
+ g_importmainargs ();
+ }
+ }
+