Re: [C++ PATCH] namespace stat hack representation

2017-05-29 Thread H.J. Lu
On Mon, May 29, 2017 at 8:11 AM, Nathan Sidwell wrote: > Currently bindings have two slots, a 'value' slot for the regular binding, > and a 'type' slot for the struct name binding, which is only used when the > value slot is holding something else. for instance: > > struct foo

Re: [C++ PATCH] namespace stat hack representation

2017-05-29 Thread Nathan Sidwell
On 05/29/2017 11:17 AM, Marek Polacek wrote: On Mon, May 29, 2017 at 11:11:12AM -0400, Nathan Sidwell wrote: +static tree stat_hack (tree decl = NULL_TREE, tree type = NULL_TREE) Should be static tree stat_hack (tree decl = NULL_TREE, tree type = NULL_TREE) to make it easier to grep for the

Re: [C++ PATCH] namespace stat hack representation

2017-05-29 Thread Marek Polacek
On Mon, May 29, 2017 at 11:11:12AM -0400, Nathan Sidwell wrote: > Currently bindings have two slots, a 'value' slot for the regular binding, > and a 'type' slot for the struct name binding, which is only used when the > value slot is holding something else. for instance: > > struct foo {...}

[C++ PATCH] namespace stat hack representation

2017-05-29 Thread Nathan Sidwell
Currently bindings have two slots, a 'value' slot for the regular binding, and a 'type' slot for the struct name binding, which is only used when the value slot is holding something else. for instance: struct foo {...} foo; The value slot will be a VAR_DECL, and the type slot an artificial