On 2/27/20 10:33 AM, Nathan Sidwell wrote:
On 2/26/20 5:00 PM, Jason Merrill wrote:
On 2/25/20 4:09 PM, Nathan Sidwell wrote:
We consider all TYPE_ARGUMENT_PACKS distinct types, leading to
problems with redeclarations.
I'd think that the bug is that we're treating them as types in the
first place; they aren't types, so they shouldn't reach comptypes.
I'd lean toward adding an assert to that effect and fixing the caller
to use e.g. template_args_equal.
Thanks, this patch implements that approach.
That TYPE_ARGUMENT_PACKS are not types, suggests to me that
NONTYPE_ARGUMENT_PACKS are not expressions. Perhaps their
representation should be unified -- I keep encountering code handling
them essentially doing the same thing for both kinds. But that's a
GCC-11 thing at least.
Agreed. I took a step in that direction when I removed TREE_TYPE from
NONTYPE_ARGUMENT_PACK, but going on to unify the packs makes sense to me.
Jason