summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/linkage1.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/linkage1.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/linkage1.C b/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
new file mode 100644
index 000000000..556ef9716
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
@@ -0,0 +1,15 @@
+// { dg-do assemble }
+typedef struct {
+ int i;
+} *p;
+
+void f (p) { } // { dg-error "with no linkage" }
+p q; // { dg-warning "with no linkage" }
+
+int main()
+{
+ extern p j; // { dg-warning "with no linkage" }
+ struct A { int j; };
+ extern A a; // { dg-warning "with no linkage" }
+ extern void f (A); // { dg-error "with no linkage" }
+}