summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/attrib9.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/attrib9.C')
-rw-r--r--gcc/testsuite/g++.dg/ext/attrib9.C10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/attrib9.C b/gcc/testsuite/g++.dg/ext/attrib9.C
new file mode 100644
index 000000000..6672f7525
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/attrib9.C
@@ -0,0 +1,10 @@
+class __attribute__((unused)) C;
+struct __attribute__((unused)) S;
+union __attribute__((unused)) U;
+enum e {};
+enum __attribute__((unused)) e; // { dg-warning "already defined" }
+
+struct __attribute((unused)) B *p; // { dg-warning "attributes" }
+
+template <class T> struct A { };
+struct __attribute((unused)) A<int>; // { dg-warning "attributes" }