Fixed segname pragmas right after a function definition.

This commit is contained in:
acqn 2024-01-18 20:59:46 +08:00
parent 92ee03f9e9
commit 9471e128b5
1 changed files with 6 additions and 3 deletions

View File

@ -685,9 +685,6 @@ void NewFunc (SymEntry* Func, FuncDesc* D)
/* Leave the lexical level */
LeaveFunctionLevel ();
/* Eat the closing brace */
ConsumeRCurly ();
/* Restore the old literal pool, remembering the one for the function */
Func->V.F.LitPool = PopLiteralPool ();
@ -699,6 +696,12 @@ void NewFunc (SymEntry* Func, FuncDesc* D)
/* Switch back to the old segments */
PopSegContext ();
/* Eat the closing brace after we've done everything with the function
** definition. This way we won't have troubles with pragmas right after
** the closing brace.
*/
ConsumeRCurly();
/* Reset the current function pointer */
FreeFunction (CurrentFunc);
CurrentFunc = 0;