]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: dump_template_bindings tweak
authorJason Merrill <jason@redhat.com>
Thu, 22 May 2025 21:11:50 +0000 (17:11 -0400)
committerJason Merrill <jason@redhat.com>
Sun, 25 May 2025 14:30:00 +0000 (10:30 -0400)
commit9b8caae8d189c5bd7de502844b17341a7a6dddc5
tree58d2b0ece8f8d3803c6d4d23905fee1dfeaa8a3c
parente3d3d6d7d2c8ab73ff597f4c82514c3217256567
c++: dump_template_bindings tweak

in r12-1100 we stopped printing template bindings like T = T.  The check for
this relied on TREE_CHAIN of a TEMPLATE_TYPE_PARM holding the declaration of
that type-parameter.  This should be written as TYPE_STUB_DECL.  In
addition, TYPE_STUB_DECL is only set on the TYPE_MAIN_VARIANT, so we need to
check that as well.  Which is also desirable because volatile T is visibly
distinct from T.

gcc/cp/ChangeLog:

* error.cc (dump_template_bindings): Correct skipping of
redundant bindings.
gcc/cp/error.cc