Re: [PATCH] c++: cv-qualified dependent name of alias tmpl [PR100592]

2021-06-02 Thread Jason Merrill via Gcc-patches
ss is error_mark_node; does it work to check that specifically rather than !TYPE_P? Indeed, checking for error_mark_node instead works nicely. Does the following look OK? Bootstrapped and regtested on x86_64-pc-linux-gnu. OK. -- >8 -- Subject: [PATCH] c++: cv-qualified dependent nam

Re: [PATCH] c++: cv-qualified dependent name of alias tmpl [PR100592]

2021-06-02 Thread Patrick Palka via Gcc-patches
ogether.) Testing in progress. > > > > For sake of concreteness, here's the full alternative patch for > > consideration (modulo ChangeLog): > > This seems better. I think the only non-type return from > lookup_template_class is error_mark_node; does it work to

Re: [PATCH] c++: cv-qualified dependent name of alias tmpl [PR100592]

2021-06-02 Thread Jason Merrill via Gcc-patches
On 6/2/21 4:56 PM, Patrick Palka wrote: On Wed, 2 Jun 2021, Patrick Palka wrote: On Wed, 2 Jun 2021, Jason Merrill wrote: On 6/2/21 2:39 PM, Patrick Palka wrote: Here, the dependent template name in the return type of f() resolves to an alias of int& after substitution, and we end up complai

Re: [PATCH] c++: cv-qualified dependent name of alias tmpl [PR100592]

2021-06-02 Thread Patrick Palka via Gcc-patches
On Wed, 2 Jun 2021, Patrick Palka wrote: > On Wed, 2 Jun 2021, Jason Merrill wrote: > > > On 6/2/21 2:39 PM, Patrick Palka wrote: > > > Here, the dependent template name in the return type of f() resolves to > > > an alias of int& after substitution, and we end up complaining about > > > qualifyi

Re: [PATCH] c++: cv-qualified dependent name of alias tmpl [PR100592]

2021-06-02 Thread Patrick Palka via Gcc-patches
On Wed, 2 Jun 2021, Jason Merrill wrote: > On 6/2/21 2:39 PM, Patrick Palka wrote: > > Here, the dependent template name in the return type of f() resolves to > > an alias of int& after substitution, and we end up complaining about > > qualifying this reference type with 'const' from cp_build_qual

Re: [PATCH] c++: cv-qualified dependent name of alias tmpl [PR100592]

2021-06-02 Thread Jason Merrill via Gcc-patches
On 6/2/21 2:39 PM, Patrick Palka wrote: Here, the dependent template name in the return type of f() resolves to an alias of int& after substitution, and we end up complaining about qualifying this reference type with 'const' from cp_build_qualified_type rather than just silently dropping the qual

[PATCH] c++: cv-qualified dependent name of alias tmpl [PR100592]

2021-06-02 Thread Patrick Palka via Gcc-patches
Here, the dependent template name in the return type of f() resolves to an alias of int& after substitution, and we end up complaining about qualifying this reference type with 'const' from cp_build_qualified_type rather than just silently dropping the qualification as per [dcl.ref]/1. We already