Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-18 Thread Jason Merrill
OK. Jason

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-18 Thread Ville Voutilainen
On 18 September 2015 at 20:46, Ville Voutilainen wrote: > Argh, no. An attribute immediately following a nesting namespace would need > to be parsed before the nested namespace definition handling is done, > otherwise > the nested namespace definition handling is never entered because the next >

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-18 Thread Ville Voutilainen
On 18 September 2015 at 20:38, Ville Voutilainen wrote: > On 18 September 2015 at 20:30, Ville Voutilainen > wrote: >> On 18 September 2015 at 20:26, Jason Merrill wrote: > I suppose so, but it seems pretty trivial. In any case, looks like your > patch would accept the odd > namespa

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-18 Thread Ville Voutilainen
On 18 September 2015 at 20:30, Ville Voutilainen wrote: > On 18 September 2015 at 20:26, Jason Merrill wrote: I suppose so, but it seems pretty trivial. In any case, looks like your patch would accept the odd namespace A __attribute ((visibility ("default"))) ::B { } >>> Yes, or n

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-18 Thread Ville Voutilainen
On 18 September 2015 at 20:26, Jason Merrill wrote: >>> I suppose so, but it seems pretty trivial. In any case, looks like your >>> patch would accept the odd >>> namespace A __attribute ((visibility ("default"))) ::B { } >> Yes, or namespace A[[nonsense]]::B {}. Those cases are easy to fix, >> b

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-18 Thread Jason Merrill
On 09/18/2015 12:58 PM, Ville Voutilainen wrote: On 18 September 2015 at 19:34, Jason Merrill wrote: This patch doesn't handle attributes yet, it looks to me as if gcc doesn't support namespace attributes in the location that the standard grammar puts them into. Mind fixing that, too? Can we

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-18 Thread Ville Voutilainen
On 18 September 2015 at 19:34, Jason Merrill wrote: This patch doesn't handle attributes yet, it looks to me as if gcc doesn't support namespace attributes in the location that the standard grammar puts them into. >>> Mind fixing that, too? >> Can we please do that separately? > I s

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-18 Thread Jason Merrill
On 09/17/2015 06:23 PM, Ville Voutilainen wrote: This patch doesn't handle attributes yet, it looks to me as if gcc doesn't support namespace attributes in the location that the standard grammar puts them into. Mind fixing that, too? + "-std=c++17 or -std=gnu++17"); Please u

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-18 Thread Jason Merrill
On 09/18/2015 12:30 PM, Ville Voutilainen wrote: On 18 September 2015 at 19:27, Jason Merrill wrote: On 09/17/2015 06:23 PM, Ville Voutilainen wrote: This patch doesn't handle attributes yet, it looks to me as if gcc doesn't support namespace attributes in the location that the standard gramm

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-18 Thread Ville Voutilainen
On 18 September 2015 at 19:27, Jason Merrill wrote: > On 09/17/2015 06:23 PM, Ville Voutilainen wrote: >> >> This patch doesn't handle attributes yet, it looks to >> me as if gcc doesn't support namespace attributes in the location that >> the standard grammar puts them into. > Mind fixing that, t

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-18 Thread Ville Voutilainen
On 18 September 2015 at 02:02, Ville Voutilainen wrote: > Ahem, oops, the patch doesn't do any sort of a pedwarn for standard versions > below cpp1z; I'll do a new patch taking that into account tomorrow. I don't > think we have maybe_warn_cpp1z or anything like that? Any preferences > how to deal

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-17 Thread Ville Voutilainen
On 18 September 2015 at 01:23, Ville Voutilainen wrote: > Ok. Tested on Linux-PPC64. This patch doesn't handle attributes yet, it looks > to > me as if gcc doesn't support namespace attributes in the location that > the standard > grammar puts them into. I had to adjust a couple of Ahem, oops,

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-17 Thread Ville Voutilainen
On 17 September 2015 at 23:11, Jason Merrill wrote: > On 09/16/2015 07:55 AM, Ville Voutilainen wrote: >> >> This is the first stab, I haven't written the tests yet. Feedback would be >> most welcome; should I put this code into a separate function? Is the >> minor >> code duplication with the reg

Re: [PATCH, RFC] Implement N4230, Nested namespace definition

2015-09-17 Thread Jason Merrill
On 09/16/2015 07:55 AM, Ville Voutilainen wrote: This is the first stab, I haven't written the tests yet. Feedback would be most welcome; should I put this code into a separate function? Is the minor code duplication with the regular namespace definition ok? I think I'd prefer to keep it in the