Allowed old-style (K and R) function declarations to be fastcall.

That lets them match old-style definitions.  It avoids "Type conflict" error messages.  It allows shorter function calls.

Fixed the types of some variables in "test/ref/otccex.c".  It avoids crashes on 64-bit Windows (32-bit Windows with 64-bit pointers).
This commit is contained in:
Greg King
2019-07-22 09:05:01 -04:00
parent cceffbdb8c
commit a0db846a97
7 changed files with 66 additions and 75 deletions

View File

@@ -171,8 +171,9 @@ static void Parse (void)
(CurTok.Tok != TOK_SEMI)) {
FuncDesc* D = GetFuncDesc (Decl.Type);
if (D->Flags & FD_EMPTY) {
D->Flags = (D->Flags & ~(FD_EMPTY | FD_VARIADIC)) | FD_VOID_PARAM;
D->Flags = (D->Flags & ~FD_EMPTY) | FD_VOID_PARAM;
}
}