Re: [C++ PATCH] hash-table for extern-c fns.

2017-10-10 Thread Jason Merrill
On Tue, Oct 10, 2017 at 3:11 PM, Nathan Sidwell wrote: > On 10/09/2017 06:15 PM, Nathan Sidwell wrote: >> >> On 10/09/2017 11:57 AM, Jason Merrill wrote: > > >>> Hmm, why do we only check extern "C" conflicts for functions? >> >> >> I suspect a bug. I noticed it as existing behaviour and was puzz

Re: [C++ PATCH] hash-table for extern-c fns.

2017-10-10 Thread Nathan Sidwell
On 10/09/2017 06:15 PM, Nathan Sidwell wrote: On 10/09/2017 11:57 AM, Jason Merrill wrote: Hmm, why do we only check extern "C" conflicts for functions? I suspect a bug.  I noticed it as existing behaviour and was puzzled the first time around rearranging this code, but didn't want to get

Re: [C++ PATCH] hash-table for extern-c fns.

2017-10-09 Thread Nathan Sidwell
On 10/09/2017 11:57 AM, Jason Merrill wrote: On Fri, Oct 6, 2017 at 10:18 AM, Nathan Sidwell 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. Hmm, why do we only check extern "C" conflicts for functions? I

Re: [C++ PATCH] hash-table for extern-c fns.

2017-10-09 Thread Jason Merrill
On Fri, Oct 6, 2017 at 10:18 AM, Nathan Sidwell 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

[C++ PATCH] hash-table for extern-c fns.

2017-10-06 Thread Nathan Sidwell
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 eit