re PR c++/92965 ("note: 'x' is not public" emitted even when no error is emitted)
authorJakub Jelinek <jakub@redhat.com>
Fri, 20 Dec 2019 23:21:21 +0000 (00:21 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 20 Dec 2019 23:21:21 +0000 (00:21 +0100)
commit7731b8e6f4bb44d2d1ec33072db65f2ccbf94121
tree09238dbdae2f23a585595bedcd98e5feae86c54a
parentb804bd89d3a8ff3ab6b916d2982b83f805cc6256
re PR c++/92965 ("note: 'x' is not public" emitted even when no error is emitted)

PR c++/92965
* pt.c (invalid_nontype_parm_type_p): Call structural_type_p with
explain=true only if emitting error.

* g++.dg/cpp2a/nontype-class27.C: New test.

From-SVN: r279684
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/nontype-class27.C [new file with mode: 0644]