[cfe-commits] [PATCH] Ignored calling conventions
João Matos
ripzonetriton at gmail.com
Thu Sep 6 19:11:26 PDT 2012
>From test cases:
+int __stdcall f(void);
+
+/* This should compile without warning because __stdcall is treated
+as __cdecl in MS compatibility mode for x64 compiles*/
+int __cdecl f(void) {
Just one concern about this: if this is not blocking a lot of code from
compiling, maybe we should treat this behaviour as an error (just like John
suggested we do on mismatched inheritance attributes)?
Also this version of the patch does not do the right thing for rewriting
tools and pretty printers, and since Clang is used a library for those
purposes, I think we should solve that too.
On Fri, Sep 7, 2012 at 2:59 AM, Aaron Ballman <aaron at aaronballman.com>wrote:
> Based on a conversation with Richard in IRC, this really does have to
> be modeled in Sema due to the way MSVC handles redeclarations. It
> truly does treat it as __cdecl even though it's not.
>
> The attached patch changes the calling convention while performing
> semantic analysis, and adds several test cases.
>
> ~Aaron
>
--
João Matos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120907/d2a5a224/attachment.html>
More information about the cfe-commits
mailing list