DavidKreitzer added a comment.
The example Aaron sent in email is a good one:
void func(int, int, int, int) __attribute__((no_caller_saved_registers,
cdecl));
int main() {
void (*fp)(int, int, int, int) __attribute__((cdecl)) = func;
func(1, 2, 3, 4);
fp(1, 2, 3, 4); // Not the same as the above call to func()?
}
Clang should at least be giving a warning for this just like it does if you try
to mix cdecl and stdcall on IA-32 or if you mix regparm(2) and regparm(3).
The current patch silently accepts the mismatch.
https://reviews.llvm.org/D22045
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits