1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-30 20:29:25 +00:00

Change order, so that the forced imports for main() go into the global

segments and not the one for main().


git-svn-id: svn://svn.cc65.org/cc65/trunk@4031 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2009-08-16 23:37:09 +00:00
parent 1bd4abdc67
commit 548dfd3060

View File

@ -364,9 +364,6 @@ void NewFunc (SymEntry* Func)
/* Function body now defined */
Func->Flags |= SC_DEF;
/* Allocate code and data segments for this function */
Func->V.F.Seg = PushSegments (Func);
/* Special handling for main() */
if (strcmp (Func->Name, "main") == 0) {
/* Main cannot be a fastcall function */
@ -395,6 +392,9 @@ void NewFunc (SymEntry* Func)
}
}
/* Allocate code and data segments for this function */
Func->V.F.Seg = PushSegments (Func);
/* If this is a fastcall function, push the last parameter onto the stack */
if (IsQualFastcall (Func->Type) && D->ParamCount > 0) {