diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-07-07 16:33:12 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2020-07-07 16:33:12 -0400 |
commit | 9845b7b45621e3833aee47276cb111e43be0e48b (patch) | |
tree | f8ff41d0207995a8ba934f42c552e8039214601e /libstdc++-v3/include/std/limits | |
parent | 7126583af5d29235584b51b3b05eeaba2adef024 (diff) | |
download | gcc-9845b7b45621e3833aee47276cb111e43be0e48b.zip gcc-9845b7b45621e3833aee47276cb111e43be0e48b.tar.gz gcc-9845b7b45621e3833aee47276cb111e43be0e48b.tar.bz2 |
c++: wrong pretty printing of nested type [PR95303]
In the testcase below, we pretty print the nested type A<int>::B as
A<int>::B<int> because we don't check whether B is itself a class
template before printing the innermost set of template arguments from
B's TEMPLATE_INFO (which in this case belong to A). This patch fixes
this by checking PRIMARY_TEMPLATE_P beforehand.
gcc/cp/ChangeLog:
PR c++/95303
* cxx-pretty-print.c (pp_cxx_unqualified_id): Check
PRIMARY_TEMPLATE_P before printing the innermost template
arguments.
gcc/testsuite/ChangeLog:
PR c++/95303
* g++.dg/concepts/diagnostic14.C: New test.
Diffstat (limited to 'libstdc++-v3/include/std/limits')
0 files changed, 0 insertions, 0 deletions