1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-03 06:29:36 +00:00

Catch fastcall pointers to variadic functions.

This commit is contained in:
Greg King 2015-03-13 12:18:43 -04:00
parent 38231a5cc6
commit b452bdc5e4

View File

@ -353,8 +353,12 @@ static void FixQualifiers (Type* DataType)
Error ("Mismatch between pointer's and function's calling conventions");
}
} else {
/* Move the qualifier from the pointer to the function. */
T[1].C |= Q;
if (Q == T_QUAL_FASTCALL && IsVariadicFunc (T + 1)) {
Error ("Variadic-function pointers cannot be `__fastcall__'");
} else {
/* Move the qualifier from the pointer to the function. */
T[1].C |= Q;
}
}
} else {
Error ("Not pointer to a function; can't use a calling convention");