A nice side effect of r12-1822 was improving the diagnostic
we emit for the following test.

Tested x86_64-pc-linux-gnu, applying to trunk.

        PR c++/79493

gcc/testsuite/ChangeLog:

        * g++.dg/diagnostic/undeclared1.C: New test.
---
 gcc/testsuite/g++.dg/diagnostic/undeclared1.C | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/diagnostic/undeclared1.C

diff --git a/gcc/testsuite/g++.dg/diagnostic/undeclared1.C 
b/gcc/testsuite/g++.dg/diagnostic/undeclared1.C
new file mode 100644
index 00000000000..98c1ecb6581
--- /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" }
+};

base-commit: 9675ecf7f9beeee340f93c68cf22280f5975a902
-- 
2.35.1

Reply via email to