[PATCH] Parse Microsoft __declspec appearing after class body

Aaron Ballman aaron at aaronballman.com
Sun Nov 24 06:40:13 PST 2013


What happens with this patch and the following ill-formed declaration:

struct S {} __declspec(deprecated);

Does this compile without error? If so, that would need to be
diagnosed (and regardless, this would be a good test to have). Note,
that code compiled with MSVC does not issue a diagnostic, but it also
doesn't apply the declspec to anything. I would say this should issue
a warning for us, and not apply the declspec to anything for greatest
compatibility vs utility.

~Aaron

On Sun, Nov 24, 2013 at 8:08 AM, Alp Toker <alp at nuanti.com> wrote:
> Hi David,
>
> The attached patch fixes __declspec parsing after the class specification.
>
> Verified against MSVC.
>
> Alp.
>
> --
> http://www.nuanti.com
> the browser experts
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>



More information about the cfe-commits mailing list