On Fri, Oct 6, 2017 at 10:18 AM, Nathan Sidwell <nat...@acm.org> wrote: > This patch converts the extern "C" function map to use a hash table, in the > same way as I've just changed namespace bindings. > > There's a small wart, in that the c_linkage_bindings user (in c-common) > expects either a single decl or a TREE_LIST. I.e. not an OVERLOAD. But the > hasher expects either a DECL or an OVERLOAD. Rather than extend the hasher > (and marginally pessimize it for this special case), I modify the extern-c > table handling to insert an initial OVERLOAD node, when there are multiple > functions. That can CHAIN directly to a TREE_LIST. Sure, we have a wasted > OVERLOAD node in this case, but it's going to be rare -- programs don't > usually declare extern "C" functions of the same name in different > namespaces. > > Changing the c-common function is harder, as OVERLOAD is a C++ FE local > node.
Hmm, why do we only check extern "C" conflicts for functions? Jason