aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/opaque0.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1994-06-07 01:57:15 +0000
committerStan Shebs <shebs@codesourcery.com>1994-06-07 01:57:15 +0000
commitef44eed173353ff002da6fe92680e40068cd081f (patch)
treebeeeaecb50227b8c1fe964debaf3c8f45bc9ac9a /gdb/testsuite/gdb.base/opaque0.c
parent33268150cbbcc90ec13f5603d566537cf4cd569e (diff)
downloadgdb-ef44eed173353ff002da6fe92680e40068cd081f.zip
gdb-ef44eed173353ff002da6fe92680e40068cd081f.tar.gz
gdb-ef44eed173353ff002da6fe92680e40068cd081f.tar.bz2
Reorganized GDB tests - base
Diffstat (limited to 'gdb/testsuite/gdb.base/opaque0.c')
-rw-r--r--gdb/testsuite/gdb.base/opaque0.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/opaque0.c b/gdb/testsuite/gdb.base/opaque0.c
new file mode 100644
index 0000000..e5a343c
--- /dev/null
+++ b/gdb/testsuite/gdb.base/opaque0.c
@@ -0,0 +1,16 @@
+/* Note that struct foo is opaque (never defined) in this file. This
+ is allowed by C since this file does not reference any members of
+ the structure. The debugger needs to be able to associate this
+ opaque structure definition with the full definition in another
+ file.
+*/
+
+struct foo *foop;
+extern struct foo *getfoo ();
+
+int main ()
+{
+ foop = getfoo ();
+ putfoo (foop);
+ return 0;
+}