In addition to keeping track of types, the type machinery also locates the global variables that the garbage collector starts at. There are two syntaxes it accepts to indicate a root:
These are the only syntaxes that are accepted. In particular, if you want to mark a variable that is only declared as
int ID;or similar, you should either make it
staticor you should create a
externdeclaration in a header file somewhere.