[qfcc] Don't check parameter size for arrays

Arrays are passed as a pointer to the first element, so are always valid
parameters. Fixes a bogus "formal parameter N is too large to be passed
by value" error.
This commit is contained in:
Bill Currie 2022-08-27 17:42:08 +09:00
parent 630dde6df7
commit af4c120d3d

View file

@ -2081,7 +2081,7 @@ build_function_call (expr_t *fexpr, const type_t *ftype, expr_t *params)
err = error (e, "type of formal parameter %d is incomplete",
i + 1);
}
if (value_too_large (t)) {
if (!is_array (t) && value_too_large (t)) {
err = error (e, "formal parameter %d is too large to be passed by"
" value", i + 1);
}