public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-7363] c++: Add new test [PR79493]
@ 2022-02-23 17:48 Marek Polacek
0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2022-02-23 17:48 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:cdcea7c1ef6586bb1eb0144b741969748cbd780b
commit r12-7363-gcdcea7c1ef6586bb1eb0144b741969748cbd780b
Author: Marek Polacek <polacek@redhat.com>
Date: Wed Feb 23 12:46:21 2022 -0500
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:
---
gcc/testsuite/g++.dg/diagnostic/undeclared1.C | 7 +++++++
1 file changed, 7 insertions(+)
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" }
+};
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-02-23 17:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 17:48 [gcc r12-7363] c++: Add new test [PR79493] Marek Polacek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).