X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=type.c;h=a35aa4477c3e46087f99107fb39d05b76fd4b423;hb=f5a27af44212805f4a00d645e8b8b9c868846a39;hp=b05492a4b31e9aa76890dd82daaa8e1fddc889a8;hpb=5c76e2f1b157b3a3f0d8be7e17c651bae4261b6d;p=cparser diff --git a/type.c b/type.c index b05492a..a35aa44 100644 --- a/type.c +++ b/type.c @@ -1025,6 +1025,9 @@ static bool function_types_compatible(const function_type_t *func1, if (!types_compatible(ret1, ret2)) return false; + if (func1->calling_convention != func2->calling_convention) + return false; + /* can parameters be compared? */ if (func1->unspecified_parameters || func2->unspecified_parameters) return true; @@ -1032,9 +1035,6 @@ static bool function_types_compatible(const function_type_t *func1, if (func1->variadic != func2->variadic) return false; - if (func1->calling_convention != func2->calling_convention) - return false; - /* TODO: handling of unspecified parameters not correct yet */ /* all argument types must be compatible */