[patch] Fix pr16247
Eli Friedman
eli.friedman at gmail.com
Tue Jun 18 09:35:49 PDT 2013
On Tue, Jun 18, 2013 at 6:57 AM, Rafael EspĂndola <
rafael.espindola at gmail.com> wrote:
> > 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.)
>
> The case I don't understand is
>
>
> extern "C" {
> static void foo() { }
> void foo(int x) {}
> }
>
> Overload in this proposal will decide that the second foo is an
> overload, we see that it is extern C, add it to the hash and now,
> where do we find the first foo? Note that it is *not* extern C
> according to the standard and our current implementation.
>
Ah... I see what you mean. The answer is we don't. :)
-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130618/c4d6e04c/attachment.html>
More information about the cfe-commits
mailing list