Something simple like: struct foo { struct foo *p; } The type parser needs to use a recursive algorithm; that detects loop-backs.