On Wed, May 15, 2013 at 9:47 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_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">> Well, improper use of italics aside, my view is that that rule does *not*<br>
> define when an entity has external linkage. Instead, that text is describing<br>
> a consequence of the declaration having external linkage (and by "can be<br>
> referred to" it really means "you don't need to block identical entities in<br>
> different translation units from linking together").<br>
><br>
> I do agree that the standard may not say what we want here, and isn't<br>
> completely clear; I filed core issue 1602 for that a few months ago for<br>
> exactly that. However, it's not been decided by CWG yet, and since (AFAICT)<br>
> it would only affect which diagnostics are mandatory and it would make<br>
> 'linkage' much more expensive to compute, there's a good chance that they'll<br>
> say it's NAD.<br>
<br>
</div>I am not sure I follow the "more expensive" argument. Any compiler (as<br>
opposed to a theoretical tool that just checks if a string is valid<br>
c++) will have to compute something like the linkage we compute, no?</blockquote><div><br></div><div>I think would be sufficient to use a globally-unique mangling for names inside anonymous namespaces and non-inline functions (like gcc used to), or to generate an 'externally visible' flag as a side-effect of computing the mangled name. But you don't need to do any of that if you're not generating code, and there are many C++-parsing tools out there which do not generate code.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> You should also be aware of core issue 1603, which brings the linkage rules<br>
> more into line with how we behave.<br>
<br>
</div>Cheers,<br>
Rafael<br>
</blockquote></div><br>