Re: [C++ PATCH] Fix concepts vs. PCH (PR c++/92458, take 2)

2019-11-24 Thread Jason Merrill
On 11/22/19 3:08 PM, Jakub Jelinek wrote: On Fri, Nov 22, 2019 at 02:43:25PM -0500, Jason Merrill wrote: @@ -5358,6 +5410,18 @@ struct tree_cache_traits : simple_cache_map_traits, tree> { }; We should probably use tree_hash instead of default_hash_traits here. OK with or without that chan

Re: [C++ PATCH] Fix concepts vs. PCH (PR c++/92458, take 2)

2019-11-22 Thread Jakub Jelinek
On Fri, Nov 22, 2019 at 02:43:25PM -0500, Jason Merrill wrote: > > @@ -5358,6 +5410,18 @@ struct tree_cache_traits > > : simple_cache_map_traits, tree> { }; > > We should probably use tree_hash instead of default_hash_traits here. OK > with or without that change. Dunno, I'd say pointer_hash

Re: [C++ PATCH] Fix concepts vs. PCH (PR c++/92458, take 2)

2019-11-22 Thread Jason Merrill
On 11/22/19 2:08 PM, Jakub Jelinek wrote: On Wed, Nov 20, 2019 at 07:46:13PM -0500, Jason Merrill wrote: If decl_tree_cache_map will be needed in more than one spot, I'll probably need to move it to some generic header. Most of them probably need it, for code that uses the relevant features. E

[C++ PATCH] Fix concepts vs. PCH (PR c++/92458, take 2)

2019-11-22 Thread Jakub Jelinek
On Wed, Nov 20, 2019 at 07:46:13PM -0500, Jason Merrill wrote: > > If decl_tree_cache_map will be needed in more than one spot, I'll probably > > need to move it to some generic header. > > Most of them probably need it, for code that uses the relevant features. > Except debug_type_map, which prob

Re: [C++ PATCH] Fix concepts vs. PCH (PR c++/92458)

2019-11-20 Thread Jason Merrill
On 11/20/19 7:21 PM, Jakub Jelinek wrote: On Mon, Nov 18, 2019 at 02:41:48PM -0500, Jason Merrill wrote: 2019-11-11 Jakub Jelinek PR c++/92458 * constraint.cc: Include tree-hash-traits.h. (decl_tree_cache_traits): New type. (decl_tree_cache_map): New typedef.

Re: [C++ PATCH] Fix concepts vs. PCH (PR c++/92458)

2019-11-20 Thread Jakub Jelinek
On Mon, Nov 18, 2019 at 02:41:48PM -0500, Jason Merrill wrote: > > 2019-11-11 Jakub Jelinek > > > > PR c++/92458 > > * constraint.cc: Include tree-hash-traits.h. > > (decl_tree_cache_traits): New type. > > (decl_tree_cache_map): New typedef. > > (decl_constraints): Change ty

Re: [C++ PATCH] Fix concepts vs. PCH (PR c++/92458)

2019-11-18 Thread Jason Merrill
On 11/12/19 12:02 AM, Jakub Jelinek wrote: Hi! PCH remaps object addresses, so hash tables that use pointer hashing don't work well across PCH, because the hash values can change and without rehashing the hash table's values might not be found. The following patch fixes it by using DECL_UID as

[C++ PATCH] Fix concepts vs. PCH (PR c++/92458)

2019-11-11 Thread Jakub Jelinek
Hi! PCH remaps object addresses, so hash tables that use pointer hashing don't work well across PCH, because the hash values can change and without rehashing the hash tbales values might not be found. The following patch fixes it by using DECL_UID as hash function instead, which is stable across