<div dir="ltr">On Fri, May 17, 2013 at 3:50 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 17 May 2013 15:44, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br>

> MSVC accepts<br>
><br>
> static int x7;<br>
> extern __declspec(selectany) int x7;<br>
><br>
> But it also accepts<br>
><br>
> static int x7;<br>
> extern int x7;<br>
<br>
</div>It should, we also do :-)<br>
<br>
In the case with __declspec(selectany), is x7 transformed into a<br>
externally visible symbol or the attribute just ignored?</blockquote><div><br></div><div style>Oh.  Looks like it's externally visible and comdat.  Looks like it needs work to accept it after initial definitions or something.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> That seems like a separate issue.  It doesn't seem that important to me to<br>
> accept this.<br>
><br>
> Clang errors out with 'attribute declaration must precede definition', which<br>
> doesn't seem useful to have in that test.<br>
<br>
</div>It is nice to have a test that there in an error, just to make sure we<br>
don't extend a microsoft extension.</blockquote><div><br></div><div style>OK.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> OK to commit as is?<br>
<br>
</div>OK with the test. There is a discussion on weak_odr being the correct<br>
linkage, but changing to _odr (if appropriate), just enables more<br>
optimizations and can be a followup patch.<br></blockquote><div><br></div><div style>The code you sent returns 5 directly with optimizations, so does that mean I can go with weak_odr? </div></div></div></div>