xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/testsuite/gdb.base/opaque0.c (revision a5a4af3bd380a7b58b758d9b311cef9f7c34aeb4)
1*a5a4af3bSchristos /*  Note that struct foo is opaque (never defined) in this file.  This
2*a5a4af3bSchristos     is allowed by C since this file does not reference any members of
3*a5a4af3bSchristos     the structure.  The debugger needs to be able to associate this
4*a5a4af3bSchristos     opaque structure definition with the full definition in another
5*a5a4af3bSchristos     file.
6*a5a4af3bSchristos */
7*a5a4af3bSchristos 
8*a5a4af3bSchristos struct foo *foop;
9*a5a4af3bSchristos extern struct foo *getfoo ();
10*a5a4af3bSchristos extern void putfoo (struct foo *foop);
11*a5a4af3bSchristos 
main()12*a5a4af3bSchristos int main ()
13*a5a4af3bSchristos {
14*a5a4af3bSchristos     foop = getfoo ();
15*a5a4af3bSchristos     putfoo (foop);
16*a5a4af3bSchristos     return 0;
17*a5a4af3bSchristos }
18