From 548dfd306047d50b195f9db17c77096df7e46f9e Mon Sep 17 00:00:00 2001 From: uz Date: Sun, 16 Aug 2009 23:37:09 +0000 Subject: [PATCH] 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 --- src/cc65/function.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cc65/function.c b/src/cc65/function.c index 9c2c3f45d..b8f1cb753 100644 --- a/src/cc65/function.c +++ b/src/cc65/function.c @@ -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) { -- 2.39.5