Skip to content

Instantly share code, notes, and snippets.

Created December 26, 2012 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4380192 to your computer and use it in GitHub Desktop.
Save anonymous/4380192 to your computer and use it in GitHub Desktop.
che@nok ~ $ cat try.c
typedef struct {
int number;
} FRIDGE;
typedef struct {
int age;
struct FRIDGE fridge;
} PERSON;
int main()
{
FRIDGE fr;
fr.number=1;
PERSON me;
me.age=1;
me.fridge.number = 1;
}
che@nok ~ $ gcc --version
gcc (Gentoo 4.5.4 p1.0, pie-0.4.7) 4.5.4
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
che@nok ~ $ gcc -o try try.c
try.c:7:16: error: field ‘fridge’ has incomplete type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment