c++: explain failing static_assert
authorJason Merrill <jason@redhat.com>
Fri, 21 Jan 2022 16:03:26 +0000 (11:03 -0500)
committerJason Merrill <jason@redhat.com>
Fri, 21 Jan 2022 19:41:00 +0000 (14:41 -0500)
commit2e01fde49eab8dfb7ba48b22c2da596b16571525
treef84355c2ba7ca6da9fdc1da1456ad9de358fbaa1
parent847a8301add0a316767878342c1367948835c181
c++: explain failing static_assert

While looking at another bug I wanted the compiler to tell me what the two
unequal values were.

gcc/cp/ChangeLog:

* semantics.cc (find_failing_clause): Return expr if not
decomposable.
(finish_static_assert): Show constant values in failing
comparison.

gcc/testsuite/ChangeLog:

* g++.dg/template/explicit-args6.C: Add expected message.
gcc/cp/semantics.cc
gcc/testsuite/g++.dg/template/explicit-args6.C