diff options
author | Linus Torvalds <torvalds@home.transmeta.com> | 2003-04-02 10:24:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:00:03 -0700 |
commit | b1f9e93e9137ab7a8462b9d89ac160e3aae4e81f (patch) | |
tree | 47911fabe194e0c5811e14efad774603ceb04cb8 /scope.h | |
parent | Add some limited attribute parsing. "packed", "aligned" and "type". (diff) | |
download | sparse-b1f9e93e9137ab7a8462b9d89ac160e3aae4e81f.tar.gz sparse-b1f9e93e9137ab7a8462b9d89ac160e3aae4e81f.tar.bz2 sparse-b1f9e93e9137ab7a8462b9d89ac160e3aae4e81f.zip |
Expose scoping to symbol binders - we'll need this to check
whether it is a re-definition (ie new declaration in the same
scope).
Diffstat (limited to 'scope.h')
-rw-r--r-- | scope.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -12,12 +12,22 @@ struct scope { struct scope *next; }; +static inline int toplevel(struct scope *scope) +{ + return scope->next == scope; +} + +extern struct scope + *block_scope, + *function_scope, + *file_scope; + extern void start_symbol_scope(void); extern void end_symbol_scope(void); extern void start_function_scope(void); extern void end_function_scope(void); -extern void bind_scope(struct symbol *); +extern void bind_scope(struct symbol *, struct scope *); #endif |