From 970508c5221f930937021203107ecbac5ac9960c Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 18 Apr 2026 11:09:17 +0200 Subject: c: fix some compatible type declarations When K&R prototypes are present, definition of compatible types and composite types becomes recursive. For example `int f(int (*)())` should be compatible with `int f(int (*)(int))` etc --- src/c_type.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/c_type.h') diff --git a/src/c_type.h b/src/c_type.h index 1347fcc..3b1e022 100644 --- a/src/c_type.h +++ b/src/c_type.h @@ -135,6 +135,7 @@ bool getfield(FieldData *res, Type, internstr); Type completetype(internstr name, int id, TypeData *td); Type typedecay(Type); bool assigncompat(Type dst, Type src); +bool typescompat(Type *pcomposite, Type, Type); enum typetag intpromote(enum typetag); Type cvtarith(Type a, Type b); Type complex2struct(Type); -- cgit v1.2.3