diff options
author | Jason Merrill <jason@redhat.com> | 2025-07-30 12:00:06 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2025-07-30 12:00:06 -0400 |
commit | d7cd6b0df54a29e23adbf98e47965c217f6e0107 (patch) | |
tree | 21107c91dc7571c93c11b5e57cca08e6ae47d23a /libgo/go/runtime/net_plan9.go | |
parent | 0340177d54d08b6375391ba164a878e6a596275e (diff) | |
download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 |
A conversation today pointed out that the current diagnostic for this case
doesn't mention the constant evaluation failure, it just says e.g.
"'p' is not a valid template argument for 'int*' because it is not the
address of a variable"
This patch improves the diagnostic in C++17 and above (post-N4268) to
diagnose failed constant-evaluation.
gcc/cp/ChangeLog:
* pt.cc (convert_nontype_argument_function): Check
cxx_constant_value on failure.
(invalid_tparm_referent_p): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/tc1/dr49.C: Adjust diagnostic.
* g++.dg/template/func2.C: Likewise.
* g++.dg/cpp1z/nontype8.C: New test.
Diffstat (limited to 'libgo/go/runtime/net_plan9.go')
0 files changed, 0 insertions, 0 deletions