}
}
-static type_t *change_calling_convention(const source_position_t *pos,
- type_t *type, cc_kind_t cconv)
+static type_t *change_calling_convention(type_t *type, cc_kind_t cconv)
{
if (!is_type_function(type)) {
- if (warning.other) {
- warningf(pos,
- "Calling convention specified on non-function type '%T'",
- type);
- }
return type;
}
switch(attribute->kind) {
case ATTRIBUTE_GNU_CDECL:
case ATTRIBUTE_MS_CDECL:
- type = change_calling_convention(&attribute->source_position,
- type, CC_CDECL);
+ type = change_calling_convention(type, CC_CDECL);
break;
case ATTRIBUTE_MS_STDCALL:
case ATTRIBUTE_GNU_STDCALL:
- type = change_calling_convention(&attribute->source_position,
- type, CC_STDCALL);
+ type = change_calling_convention(type, CC_STDCALL);
break;
case ATTRIBUTE_MS_FASTCALL:
case ATTRIBUTE_GNU_FASTCALL:
- type = change_calling_convention(&attribute->source_position,
- type, CC_FASTCALL);
+ type = change_calling_convention(type, CC_FASTCALL);
break;
case ATTRIBUTE_MS_THISCALL:
- type = change_calling_convention(&attribute->source_position,
- type, CC_THISCALL);
+ type = change_calling_convention(type, CC_THISCALL);
break;
case ATTRIBUTE_GNU_MODE:
type = handle_attribute_mode(attribute, type);
if (func1->linkage != func2->linkage)
return false;
+ /* this would make alot of sense, but gcc doesn't seem to do this */
+#if 0
if (func1->calling_convention != func2->calling_convention)
return false;
+#endif
/* can parameters be compared? */
if (func1->unspecified_parameters || func2->unspecified_parameters)