Re: [PATCH] c++: template instantiation during fold_for_warn [PR94038]

2020-05-23 Thread Patrick Palka via Gcc-patches
On Fri, 22 May 2020, Jason Merrill wrote: > On 5/22/20 9:18 PM, Patrick Palka wrote: > > On Fri, 22 May 2020, Jason Merrill wrote: > > > On 5/20/20 10:08 PM, Patrick Palka wrote: > > > > On Wed, 20 May 2020, Patrick Palka wrote: > > > > > On Tue, 19 May 2020, Jason Merrill wrote: > > > > > > > > >

Re: [PATCH] c++: template instantiation during fold_for_warn [PR94038]

2020-05-22 Thread Jason Merrill via Gcc-patches
On 5/22/20 9:18 PM, Patrick Palka wrote: On Fri, 22 May 2020, Jason Merrill wrote: On 5/20/20 10:08 PM, Patrick Palka wrote: On Wed, 20 May 2020, Patrick Palka wrote: On Tue, 19 May 2020, Jason Merrill wrote: On 5/8/20 11:42 AM, Patrick Palka wrote: On Wed, 6 May 2020, Patrick Palka wrote:

Re: [PATCH] c++: template instantiation during fold_for_warn [PR94038]

2020-05-22 Thread Patrick Palka via Gcc-patches
On Fri, 22 May 2020, Jason Merrill wrote: > On 5/20/20 10:08 PM, Patrick Palka wrote: > > On Wed, 20 May 2020, Patrick Palka wrote: > > > On Tue, 19 May 2020, Jason Merrill wrote: > > > > > > > On 5/8/20 11:42 AM, Patrick Palka wrote: > > > > > On Wed, 6 May 2020, Patrick Palka wrote: > > > > > >

Re: [PATCH] c++: template instantiation during fold_for_warn [PR94038]

2020-05-22 Thread Jason Merrill via Gcc-patches
On 5/20/20 10:08 PM, Patrick Palka wrote: On Wed, 20 May 2020, Patrick Palka wrote: On Tue, 19 May 2020, Jason Merrill wrote: On 5/8/20 11:42 AM, Patrick Palka wrote: On Wed, 6 May 2020, Patrick Palka wrote: On Wed, 6 May 2020, Patrick Palka wrote: On Tue, 5 May 2020, Patrick Palka wrote:

Re: [PATCH] c++: template instantiation during fold_for_warn [PR94038]

2020-05-20 Thread Patrick Palka via Gcc-patches
On Wed, 20 May 2020, Patrick Palka wrote: > On Tue, 19 May 2020, Jason Merrill wrote: > > > On 5/8/20 11:42 AM, Patrick Palka wrote: > > > On Wed, 6 May 2020, Patrick Palka wrote: > > > > > > > On Wed, 6 May 2020, Patrick Palka wrote: > > > > > > > > > On Tue, 5 May 2020, Patrick Palka wrote: >

Re: [PATCH] c++: template instantiation during fold_for_warn [PR94038]

2020-05-20 Thread Patrick Palka via Gcc-patches
t; -fold_cache->put (x, x); > > + if (!c.evaluation_restricted_p ()) > > +{ > > + fold_cache->put (org_x, x); > > + /* Prevent that we try to fold an already folded result again. */ > > + if (x != org_x) > > + fold_cache->put

Re: [PATCH] c++: template instantiation during fold_for_warn [PR94038]

2020-05-19 Thread Jason Merrill via Gcc-patches
On 5/8/20 11:42 AM, Patrick Palka wrote: On Wed, 6 May 2020, Patrick Palka wrote: On Wed, 6 May 2020, Patrick Palka wrote: On Tue, 5 May 2020, Patrick Palka wrote: On Tue, 5 May 2020, Patrick Palka wrote: Unfortunately, the previous fix to PR94038 is fragile. When the argument to fold_fo

Re: [PATCH] c++: template instantiation during fold_for_warn [PR94038]

2020-05-08 Thread Patrick Palka via Gcc-patches
On Wed, 6 May 2020, Patrick Palka wrote: > On Wed, 6 May 2020, Patrick Palka wrote: > > > On Tue, 5 May 2020, Patrick Palka wrote: > > > > > On Tue, 5 May 2020, Patrick Palka wrote: > > > > > > > Unfortunately, the previous fix to PR94038 is fragile. When the > > > > argument to fold_for_warn

Re: [PATCH] c++: template instantiation during fold_for_warn [PR94038]

2020-05-06 Thread Patrick Palka via Gcc-patches
On Wed, 6 May 2020, Patrick Palka wrote: > On Tue, 5 May 2020, Patrick Palka wrote: > > > On Tue, 5 May 2020, Patrick Palka wrote: > > > > > Unfortunately, the previous fix to PR94038 is fragile. When the > > > argument to fold_for_warn is a bare CALL_EXPR, then all is well: the > > > result of

Re: [PATCH] c++: template instantiation during fold_for_warn [PR94038]

2020-05-05 Thread Patrick Palka via Gcc-patches
On Tue, 5 May 2020, Patrick Palka wrote: > On Tue, 5 May 2020, Patrick Palka wrote: > > > Unfortunately, the previous fix to PR94038 is fragile. When the > > argument to fold_for_warn is a bare CALL_EXPR, then all is well: the > > result of maybe_constant_value from fold_for_warn (with > > uid_s

Re: [PATCH] c++: template instantiation during fold_for_warn [PR94038]

2020-05-05 Thread Patrick Palka via Gcc-patches
On Tue, 5 May 2020, Patrick Palka wrote: > Unfortunately, the previous fix to PR94038 is fragile. When the > argument to fold_for_warn is a bare CALL_EXPR, then all is well: the > result of maybe_constant_value from fold_for_warn (with > uid_sensitive=true) is reused via the cv_cache in the subse

[PATCH] c++: template instantiation during fold_for_warn [PR94038]

2020-05-05 Thread Patrick Palka via Gcc-patches
Unfortunately, the previous fix to PR94038 is fragile. When the argument to fold_for_warn is a bare CALL_EXPR, then all is well: the result of maybe_constant_value from fold_for_warn (with uid_sensitive=true) is reused via the cv_cache in the subsequent call to maybe_constant_value from cp_fold (w