[PATCH] Implement __declspec(selectany) under -fms-extensions

Reid Kleckner rnk at google.com
Fri May 17 12:44:36 PDT 2013


MSVC accepts

static int x7;
extern __declspec(selectany) int x7;

But it also accepts

static int x7;
extern int x7;

That seems like a separate issue.  It doesn't seem that important to me to
accept this.

Clang errors out with 'attribute declaration must precede definition',
which doesn't seem useful to have in that test.

OK to commit as is?


On Fri, May 17, 2013 at 3:36 PM, Rafael Ávila de Espíndola <
rafael.espindola at gmail.com> wrote:

>
>   Should
>
>   static int x;
>   extern __declspec(selectany) int x;
>
>   work or be rejected? If rejected, LGTM with it added as a test.
>
> http://llvm-reviews.chandlerc.com/D814
>
> BRANCH
>   selectany
>
> ARCANIST PROJECT
>   clang
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130517/86a1b728/attachment.html>


More information about the cfe-commits mailing list