[C++ PATCH] namespace bindings

2017-05-23 Thread Nathan Sidwell
There's a twisty set of function calling to get at a namespace binding. This patch cleans that up. nathan -- Nathan Sidwell 2017-05-23 Nathan Sidwell * name-lookup.c (find_namespace_binding): New. (pushdecl_maybe_friend_1): Use CP_DECL_CONTEXT. (set_identifier_type_value_with_scope): Use

[C++ PATCH] namespace bindings and pushdecl_top_level

2017-05-11 Thread Nathan Sidwell
This patch * changes a few uses of top_level_bindings_p to namespace_bindings_p. * moves some pushdecl_* declarations from cp-tree.h to name-lookup.h. * renames pushdecl_top_level_and_finish to pushdecl_top_level_with_init. nathan -- Nathan Sidwell 2017-05-11 Nathan Sidwell * cp-tree.h (pus

Re: [C++ PATCH] namespace bindings

2017-05-08 Thread Nathan Sidwell
On 05/08/2017 11:17 AM, Andreas Schwab wrote: g++.dg/cpp0x/defaulted34.C has the same problem. I'd managed to flub my xcompiler build. The code path for fn-descriptor-using targets is different, and I'd missed that the shadowed outer 'fn' was expected to have been initialized in that case.

Re: [C++ PATCH] namespace bindings

2017-05-08 Thread Nathan Sidwell
On 05/08/2017 08:56 AM, Jason Merrill wrote: On Fri, May 5, 2017 at 4:07 PM, Nathan Sidwell wrote: This cleanup patch kills IDENTIFIER_NAMESPACE_VALUE and replaces {get,set}_namespace_binding with get_namespace_value and set_global_value respectively. I'd prefer to stick with the _binding nam

Re: [C++ PATCH] namespace bindings

2017-05-08 Thread Andreas Schwab
On Mai 08 2017, Nathan Sidwell wrote: > On 05/08/2017 08:07 AM, Andreas Schwab wrote: >> On Mai 05 2017, Nathan Sidwell wrote: >> >>> This cleanup patch kills IDENTIFIER_NAMESPACE_VALUE and replaces >>> {get,set}_namespace_binding with get_namespace_value and set_global_value >>> respectively. >

Re: [C++ PATCH] namespace bindings

2017-05-08 Thread Nathan Sidwell
On 05/08/2017 08:07 AM, Andreas Schwab wrote: On Mai 05 2017, Nathan Sidwell wrote: This cleanup patch kills IDENTIFIER_NAMESPACE_VALUE and replaces {get,set}_namespace_binding with get_namespace_value and set_global_value respectively. I'm getting this regression on ia64: FAIL: g++.dg/temp

Re: [C++ PATCH] namespace bindings

2017-05-08 Thread Nathan Sidwell
On 05/08/2017 08:56 AM, Jason Merrill wrote: On Fri, May 5, 2017 at 4:07 PM, Nathan Sidwell wrote: This cleanup patch kills IDENTIFIER_NAMESPACE_VALUE and replaces {get,set}_namespace_binding with get_namespace_value and set_global_value respectively. I'd prefer to stick with the _binding nam

Re: [C++ PATCH] namespace bindings

2017-05-08 Thread Nathan Sidwell
On 05/08/2017 08:07 AM, Andreas Schwab wrote: On Mai 05 2017, Nathan Sidwell wrote: This cleanup patch kills IDENTIFIER_NAMESPACE_VALUE and replaces {get,set}_namespace_binding with get_namespace_value and set_global_value respectively. I'm getting this regression on ia64: Sorry, I'll tak

Re: [C++ PATCH] namespace bindings

2017-05-08 Thread Jason Merrill via gcc-patches
On Fri, May 5, 2017 at 4:07 PM, Nathan Sidwell wrote: > This cleanup patch kills IDENTIFIER_NAMESPACE_VALUE and replaces > {get,set}_namespace_binding with get_namespace_value and set_global_value > respectively. I'd prefer to stick with the _binding naming, as "value" is more ambiguous. Jason

Re: [C++ PATCH] namespace bindings

2017-05-08 Thread Andreas Schwab
On Mai 05 2017, Nathan Sidwell wrote: > This cleanup patch kills IDENTIFIER_NAMESPACE_VALUE and replaces > {get,set}_namespace_binding with get_namespace_value and set_global_value > respectively. I'm getting this regression on ia64: FAIL: g++.dg/template/virtual3.C -std=c++11 (test for excess

[C++ PATCH] namespace bindings

2017-05-05 Thread Nathan Sidwell
This cleanup patch kills IDENTIFIER_NAMESPACE_VALUE and replaces {get,set}_namespace_binding with get_namespace_value and set_global_value respectively. we're a little confused as to whether 'toplevel' means any namespace or means the global namespace. I'm trying to be consistent such that g