X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=type.c;h=a35aa4477c3e46087f99107fb39d05b76fd4b423;hb=953a820405dfd857ff9f5e24f3b630b6103dad46;hp=3c6bed6444e5909a2596979a32aa074adb2bc930;hpb=5668cfa66fad0283559dc1f9deaf2bd16440efe4;p=cparser diff --git a/type.c b/type.c index 3c6bed6..a35aa44 100644 --- a/type.c +++ b/type.c @@ -933,9 +933,8 @@ bool is_type_arithmetic(const type_t *type) */ bool is_type_real(const type_t *type) { - /* 6.2.5.17 */ - return is_type_integer(type) - || (type->kind == TYPE_ATOMIC && is_type_float(type)); + /* 6.2.5 (17) */ + return is_type_integer(type) || is_type_float(type); } /** @@ -1026,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; @@ -1033,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 */