aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/other/void1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/other/void1.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/other/void1.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/other/void1.C b/gcc-4.9/gcc/testsuite/g++.dg/other/void1.C
new file mode 100644
index 000000000..691e6f782
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/other/void1.C
@@ -0,0 +1,16 @@
+// PR c++/9278
+// { dg-do compile }
+
+typedef void VOID;
+
+int foo(void);
+int bar(VOID); // { dg-error "type|invalid use" }
+
+template<int> int foo(void);
+template<int> int bar(VOID); // { dg-error "type|invalid use" }
+
+struct A
+{
+ int foo(void);
+ int bar(VOID); // { dg-error "type|invalid use" }
+};