Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-28 Thread Jason Merrill
On Wed, Nov 28, 2018 at 11:57 AM Marek Polacek wrote: > > On Tue, Nov 27, 2018 at 04:01:46PM -0500, Jason Merrill wrote: > > > > > if (cp_lexer_next_token_is (parser->lexer, CPP_NAME)) > > > > > { > > > > > identifier = cp_parser_identifier (parser); > > > > > @@ -18904,

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-28 Thread Marek Polacek
On Tue, Nov 27, 2018 at 04:01:46PM -0500, Jason Merrill wrote: > > > > if (cp_lexer_next_token_is (parser->lexer, CPP_NAME)) > > > > { > > > > identifier = cp_parser_identifier (parser); > > > > @@ -18904,7 +18916,12 @@ cp_parser_namespace_definition (cp_parser* > > > >

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-27 Thread Jason Merrill
On 11/23/18 4:12 PM, Marek Polacek wrote: I wasn't aware you had worked on this. Perhaps we should track the progress of C++20 features in Bugzilla (to keep track of who's working on what). Yes, I think so. I created a couple of PRs, for contracts and cmpxchg with padding bits, but more are

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-27 Thread Jason Merrill
On 11/21/18 8:46 PM, Marek Polacek wrote: On Tue, Nov 20, 2018 at 04:59:46PM -0500, Jason Merrill wrote: On 11/19/18 5:12 PM, Marek Polacek wrote: On Mon, Nov 19, 2018 at 10:33:17PM +0100, Jakub Jelinek wrote: On Mon, Nov 19, 2018 at 04:21:19PM -0500, Marek Polacek wrote: 2018-11-19 Marek Po

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-23 Thread Ville Voutilainen
On Fri, 23 Nov 2018 at 23:12, Marek Polacek wrote: > > >A nested namespace definition cannot be inline. This is supposed to handle > > >cases such as > > >namespace A::B::inline C { ... } > > >because after 'C' we don't see :: so it breaks and we call push_namespace > > >outside the for loop. So

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-23 Thread Marek Polacek
On Thu, Nov 22, 2018 at 10:04:26AM +0200, Ville Voutilainen wrote: > On Tue, Nov 20, 2018 at 04:59:46PM -0500, Jason Merrill wrote: > > On 11/19/18 5:12 PM, Marek Polacek wrote: > >> > + /* Don't forget that the innermost namespace might have been > >> > + marked as inline. */ > >> > + is_in

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-22 Thread Ville Voutilainen
On Tue, Nov 20, 2018 at 04:59:46PM -0500, Jason Merrill wrote: > On 11/19/18 5:12 PM, Marek Polacek wrote: >> > + /* Don't forget that the innermost namespace might have been >> > + marked as inline. */ >> > + is_inline |= nested_inline_p; >> This looks wrong: an inline namespace does not ma

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-21 Thread Marek Polacek
On Tue, Nov 20, 2018 at 04:59:46PM -0500, Jason Merrill wrote: > On 11/19/18 5:12 PM, Marek Polacek wrote: > > On Mon, Nov 19, 2018 at 10:33:17PM +0100, Jakub Jelinek wrote: > > > On Mon, Nov 19, 2018 at 04:21:19PM -0500, Marek Polacek wrote: > > > > 2018-11-19 Marek Polacek > > > > > > > >

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-20 Thread Jason Merrill
On 11/19/18 5:12 PM, Marek Polacek wrote: On Mon, Nov 19, 2018 at 10:33:17PM +0100, Jakub Jelinek wrote: On Mon, Nov 19, 2018 at 04:21:19PM -0500, Marek Polacek wrote: 2018-11-19 Marek Polacek Implement P1094R2, Nested inline namespaces. * g++.dg/cpp2a/nested-inline-ns1.C: N

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-20 Thread Marek Polacek
On Tue, Nov 20, 2018 at 10:36:32AM +0100, Jakub Jelinek wrote: > On Tue, Nov 20, 2018 at 10:25:01AM +0100, Richard Biener wrote: > > > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > > > Just another small comment - given the usual high number of > > C++ regressions delaying the release

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-20 Thread Jakub Jelinek
On Tue, Nov 20, 2018 at 10:25:01AM +0100, Richard Biener wrote: > > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > Just another small comment - given the usual high number of > C++ regressions delaying the release is Stage3 the right time > to add new language features? I'd say this is

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-20 Thread Richard Biener
On Mon, Nov 19, 2018 at 11:12 PM Marek Polacek wrote: > > On Mon, Nov 19, 2018 at 10:33:17PM +0100, Jakub Jelinek wrote: > > On Mon, Nov 19, 2018 at 04:21:19PM -0500, Marek Polacek wrote: > > > 2018-11-19 Marek Polacek > > > > > > Implement P1094R2, Nested inline namespaces. > > > * g++

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-19 Thread Marek Polacek
On Mon, Nov 19, 2018 at 10:33:17PM +0100, Jakub Jelinek wrote: > On Mon, Nov 19, 2018 at 04:21:19PM -0500, Marek Polacek wrote: > > 2018-11-19 Marek Polacek > > > > Implement P1094R2, Nested inline namespaces. > > * g++.dg/cpp2a/nested-inline-ns1.C: New test. > > * g++.dg/cpp2a/nest

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-19 Thread Jakub Jelinek
On Mon, Nov 19, 2018 at 04:21:19PM -0500, Marek Polacek wrote: > 2018-11-19 Marek Polacek > > Implement P1094R2, Nested inline namespaces. > * g++.dg/cpp2a/nested-inline-ns1.C: New test. > * g++.dg/cpp2a/nested-inline-ns2.C: New test. > * g++.dg/cpp2a/nested-inline-ns3.C