Re: [PATCH] decl lang hooks

2017-05-12 Thread Richard Biener
On May 13, 2017 2:01:11 AM GMT+02:00, Nathan Sidwell wrote: >On 05/12/2017 03:26 AM, Richard Biener wrote: >> On Thu, May 11, 2017 at 7:58 PM, Nathan Sidwell >wrote: >>> On 05/11/2017 01:50 PM, Rainer Orth wrote: >>> however, it breaks bootstrap with --enable-languages=obj-c++: >>> >>> >>> w

Re: [PATCH] decl lang hooks

2017-05-12 Thread Nathan Sidwell
On 05/12/2017 03:26 AM, Richard Biener wrote: On Thu, May 11, 2017 at 7:58 PM, Nathan Sidwell wrote: On 05/11/2017 01:50 PM, Rainer Orth wrote: however, it breaks bootstrap with --enable-languages=obj-c++: wierd, I thought --enable-languges=all enabled that (and I have seen objc issues pop

Re: [PATCH] decl lang hooks

2017-05-12 Thread Mike Stump
On May 11, 2017, at 12:16 PM, Nathan Sidwell wrote: > > On 05/11/2017 01:50 PM, Rainer Orth wrote: >> Hi Nathan, >>> On 05/08/2017 05:34 PM, Joseph Myers wrote: > >> ^~ >> make: *** [Makefile:1102: objcp/objcp-lang.o] Error 1 > > Having learnt

Re: [PATCH] decl lang hooks

2017-05-12 Thread Richard Biener
On Thu, May 11, 2017 at 7:58 PM, Nathan Sidwell wrote: > On 05/11/2017 01:50 PM, Rainer Orth wrote: > >> however, it breaks bootstrap with --enable-languages=obj-c++: > > > wierd, I thought --enable-languges=all enabled that (and I have seen objc > issues pop up during development). Will take ano

Re: [PATCH] decl lang hooks

2017-05-11 Thread Nathan Sidwell
On 05/11/2017 01:50 PM, Rainer Orth wrote: Hi Nathan, On 05/08/2017 05:34 PM, Joseph Myers wrote: ^~ make: *** [Makefile:1102: objcp/objcp-lang.o] Error 1 Having learnt how to spell --enable-languages properly today, here's the fix, whi

Re: [PATCH] decl lang hooks

2017-05-11 Thread Nathan Sidwell
On 05/11/2017 01:50 PM, Rainer Orth wrote: however, it breaks bootstrap with --enable-languages=obj-c++: wierd, I thought --enable-languges=all enabled that (and I have seen objc issues pop up during development). Will take another look. nathan -- Nathan Sidwell

Re: [PATCH] decl lang hooks

2017-05-11 Thread Rainer Orth
Hi Nathan, > On 05/08/2017 05:34 PM, Joseph Myers wrote: >> On Mon, 8 May 2017, Nathan Sidwell wrote: > >>> This patch changes the C++ FE to override the pushdecl and getdecl lang >>> hooks. >>> In addition to simply overriding them there, I had to fixup a couple of >>> places >>> in c-family/c-co

Re: [PATCH] decl lang hooks

2017-05-09 Thread Nathan Sidwell
On 05/08/2017 05:34 PM, Joseph Myers wrote: On Mon, 8 May 2017, Nathan Sidwell wrote: This patch changes the C++ FE to override the pushdecl and getdecl lang hooks. In addition to simply overriding them there, I had to fixup a couple of places in c-family/c-common.c and objc/objc-gnu-runtime-a

Re: [PATCH] decl lang hooks

2017-05-09 Thread Nathan Sidwell
On 05/09/2017 07:01 AM, Marek Polacek wrote: On Mon, May 08, 2017 at 03:16:13PM -0400, Nathan Sidwell wrote: +/* Return the list of decls in the global namespace. */ + +static +tree get_global_decls () These look weird - I'd expect to see "static tree" on the same line. D'oh! thanks for no

Re: [PATCH] decl lang hooks

2017-05-09 Thread Marek Polacek
On Mon, May 08, 2017 at 03:16:13PM -0400, Nathan Sidwell wrote: > +/* Return the list of decls in the global namespace. */ > + > +static > +tree get_global_decls () > +{ > + return NAMESPACE_LEVEL (global_namespace)->names; > +} > + > +/* Push DECL into the current scope. */ > + > +static > +tre

Re: [PATCH] decl lang hooks

2017-05-08 Thread Joseph Myers
On Mon, 8 May 2017, Nathan Sidwell wrote: > cp/name-lookup has a twisty maze of forwarding functions. One reason is that > a couple of the names are used directly by c-common.c. However, we now have > lang hooks for these things. > > This patch changes the C++ FE to override the pushdecl and ge

[PATCH] decl lang hooks

2017-05-08 Thread Nathan Sidwell
cp/name-lookup has a twisty maze of forwarding functions. One reason is that a couple of the names are used directly by c-common.c. However, we now have lang hooks for these things. This patch changes the C++ FE to override the pushdecl and getdecl lang hooks. In addition to simply overridi