Re: [C++ Patch] Prefer error + inform to two errors in check_template_shadow

2015-07-21 Thread Jason Merrill
On 07/21/2015 09:58 AM, Paolo Carlini wrote: What about applying something like my first patch with a comment that in principle we would like to extend it carefully to more cases outside template parameters? OK, sure. Jason

Re: [C++ Patch] Prefer error + inform to two errors in check_template_shadow

2015-07-21 Thread Paolo Carlini
Hi, On 07/21/2015 06:07 PM, Jason Merrill wrote: On 07/21/2015 09:02 AM, Paolo Carlini wrote: I had a look and tried various things... Ultimately the issue is due to the type_was_error_mark_node becomes integer_type_node trick in grokdeclarator (which I don't like that much ;) What happens if

Re: [C++ Patch] Prefer error + inform to two errors in check_template_shadow

2015-07-21 Thread Jason Merrill
On 07/21/2015 09:02 AM, Paolo Carlini wrote: I had a look and tried various things... Ultimately the issue is due to the type_was_error_mark_node becomes integer_type_node trick in grokdeclarator (which I don't like that much ;) What happens if we just remove that trick? Jason

Re: [C++ Patch] Prefer error + inform to two errors in check_template_shadow

2015-07-21 Thread Paolo Carlini
Hi again, On 07/14/2015 05:43 PM, Paolo Carlini wrote: Hi, On 07/14/2015 05:07 PM, Jason Merrill wrote: On 07/13/2015 09:41 AM, Paolo Carlini wrote: +++ testsuite/g++.dg/template/crash81.C (working copy) @@ -3,6 +3,6 @@ struct A { template struct X; // { dg-error "'T' has not been de

Re: [C++ Patch] Prefer error + inform to two errors in check_template_shadow

2015-07-14 Thread Paolo Carlini
Hi, On 07/14/2015 05:07 PM, Jason Merrill wrote: On 07/13/2015 09:41 AM, Paolo Carlini wrote: +++ testsuite/g++.dg/template/crash81.C (working copy) @@ -3,6 +3,6 @@ struct A { template struct X; // { dg-error "'T' has not been declared" "T" } - // { dg-error "declaration of 'template

Re: [C++ Patch] Prefer error + inform to two errors in check_template_shadow

2015-07-14 Thread Jason Merrill
On 07/13/2015 09:41 AM, Paolo Carlini wrote: +++ testsuite/g++.dg/template/crash81.C (working copy) @@ -3,6 +3,6 @@ struct A { template struct X; // { dg-error "'T' has not been declared" "T" } - // { dg-error "declaration of 'template struct A::X'" "A::X" { target *-*-* } 5 } - // { d