c++: add comment
authorJason Merrill <jason@redhat.com>
Thu, 3 Feb 2022 21:23:24 +0000 (16:23 -0500)
committerJason Merrill <jason@redhat.com>
Sat, 5 Feb 2022 05:56:05 +0000 (00:56 -0500)
gcc/cp/ChangeLog:

* pt.cc (iterative_hash_template_arg): Add comment.

gcc/cp/pt.cc

index 60641d8..f640612 100644 (file)
@@ -1797,6 +1797,10 @@ iterative_hash_template_arg (tree arg, hashval_t val)
   switch (code)
     {
     case ARGUMENT_PACK_SELECT:
+      /* Getting here with an ARGUMENT_PACK_SELECT means we're probably
+        preserving it in a hash table, which is bad because it will change
+        meaning when gen_elem_of_pack_expansion_instantiation changes the
+        ARGUMENT_PACK_SELECT_INDEX.  */
       gcc_unreachable ();
 
     case ERROR_MARK: