source: CIVL/mods/dev.civl.abc/examples/completeStruct.c

main
Last change on this file was aad342c, checked in by Stephen Siegel <siegel@…>, 3 years ago

Performing huge refactor to incorporate ABC, GMC, and SARL into CIVL repo and use Java modules.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5664 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 401 bytes
RevLine 
[aad342c]1/* completeStruct.c: example where a structure is first declared
2 * in an incomplete state, then a typdef is made to that type,
3 * then the structure is completed, then the typedef is used.
4 * The use should work because the typedef is like a reference to
5 * the type which was completed.
6 */
7
8struct foo;
9typedef struct foo Foo;
10struct foo {int x;};
11int main() {
12 Foo f;
13 f.x = 1;
14 return f.x;
15}
Note: See TracBrowser for help on using the repository browser.