<div dir="ltr">On Tue, Jun 18, 2013 at 5:47 AM, 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>> I also badgered the committee back in February when this last came up,<br>

> and no consensus for a language change appeared. I'm trying<br>
> rebadgering :)<br>
<br>
</div>Until then I think we should conform to what other compilers do and is<br>
less surprising to the users. This is not the same case as, for<br>
example, dependent bases, where the standard was not implemented by<br>
gcc and msvc at the time but was a better model than what those<br>
compilers implemented. Examples like:<br>
<div><br>
extern "C" {<br>
  static void foo(int x);<br>
  static void foo() {<br>
  }<br>
  void foo(int x) {<br>
  }<br>
}<br>
<br>
</div>show are not adding value by being pedantically correct.<br>
<br>
I am not sure I understand your suggestion about<br>
LocallyScopedExternCDecls. Consider a variant of the testcase above<br>
with just the last two functions. The foo(int) will be the fist extern<br>
C and overload resolution will decide we have an overload. We would<br>
have to walk the lookup results again to find foo().<br>
</blockquote><div><br></div><div>Suppose overloading completely ignores whether a declaration is extern "C", and suppose you have a hashtable which returns the extern "C" decl for a given identifier.  After you conclude foo(int) overloads foo(), you look in the hashtable and say "oops, there was already a declaration with that name".  (I haven't really thought through whether this is a good idea.)<br>
<br></div><div>-Eli<br></div></div></div></div>