[cfe-commits] [PATCH] Ignored calling conventions

Aaron Ballman aaron at aaronballman.com
Thu Sep 6 19:17:35 PDT 2012


On Thu, Sep 6, 2012 at 10:11 PM, João Matos <ripzonetriton at gmail.com> wrote:
> 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)?

Since it's a documented behavior for MSVC, we should consider
supporting it the same way.  This isn't bug-for-bug compatibility so
much as honoring what MSVC has decided a language extension's behavior
should be.

> 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.

Correct, but as Richard has pointed out, rewriters already fail with
attributes anyway because they cannot get the original spelling.  This
does add to that burden, but minimally.

~Aaron




More information about the cfe-commits mailing list