[PATCH] D22045: [X86] Support of no_caller_saved_registers attribute (Clang part)
David Kreitzer via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 25 10:01:38 PDT 2016
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
More information about the cfe-commits
mailing list