From: Marek Polacek Date: Wed, 23 Feb 2022 17:46:21 +0000 (-0500) Subject: c++: Add new test [PR79493] X-Git-Tag: upstream/12.2.0~1334 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cdcea7c1ef6586bb1eb0144b741969748cbd780b;p=platform%2Fupstream%2Fgcc.git c++: Add new test [PR79493] A nice side effect of r12-1822 was improving the diagnostic we emit for the following test. PR c++/79493 gcc/testsuite/ChangeLog: * g++.dg/diagnostic/undeclared1.C: New test. --- diff --git a/gcc/testsuite/g++.dg/diagnostic/undeclared1.C b/gcc/testsuite/g++.dg/diagnostic/undeclared1.C new file mode 100644 index 0000000..98c1ecb --- /dev/null +++ b/gcc/testsuite/g++.dg/diagnostic/undeclared1.C @@ -0,0 +1,7 @@ +// PR c++/79493 + +namespace A { } +struct B { + void f(A::nonexistent param); // { dg-error ".A::nonexistent. has not been declared" } + void* g(A::nonexistent param); // { dg-error ".A::nonexistent. has not been declared" } +};