]> git.sur5r.net Git - cc65/blobdiff - src/cc65/declare.c
Track usage of the sreg and several other zero page registers and remove
[cc65] / src / cc65 / declare.c
index feac79212ea5a21a2a910cac971de40c1529711d..9aabf0eabc9346364403e8d5a7a685d1a6989dc3 100644 (file)
@@ -807,12 +807,12 @@ static void Decl (Declaration* D, unsigned Mode)
        /* Parse the function */
        Decl (D, Mode);
        /* Set the fastcall flag */
-       if (!IsTypeFunc (T)) {
+       if (!IsTypeFunc (T) && !IsTypeFuncPtr (T)) {
            Error ("__fastcall__ modifier applied to non function");
        } else if (IsVariadicFunc (T)) {
            Error ("Cannot apply __fastcall__ to functions with variable parameter list");
        } else {
-           FuncDesc* F = (FuncDesc*) DecodePtr (T+1);
+           FuncDesc* F = GetFuncDesc (T);
                    F->Flags |= FD_FASTCALL;
        }
        return;