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.
This commit is contained in:
Marek Polacek 2022-02-23 12:46:21 -05:00
parent 9675ecf7f9
commit cdcea7c1ef
1 changed files with 7 additions and 0 deletions

View File

@ -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" }
};