aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-05 13:13:12 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:03:29 -0700
commit593a9f8db63c37420dde3d298e289ffd22f68b4d (patch)
treead940afbc80213bdd8c86a4b6b67eab327bd5426 /token.h
parentHandle predefines for integer types, floating point types, (diff)
downloadsparse-593a9f8db63c37420dde3d298e289ffd22f68b4d.tar.gz
sparse-593a9f8db63c37420dde3d298e289ffd22f68b4d.tar.bz2
sparse-593a9f8db63c37420dde3d298e289ffd22f68b4d.zip
Introduce the notion of "reserved" identifiers.
The only thing they do is to refuse to bind to the regular C namespaces (NS_TYPEDEF | NS_STRUCT | NS_LABEL | NS_SYMBOL) with a warning. You can mark any identifier you want reserved by just setting ident->reserved = 1. Sparse won't care.
Diffstat (limited to 'token.h')
-rw-r--r--token.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/token.h b/token.h
index d4defd7..af96121 100644
--- a/token.h
+++ b/token.h
@@ -54,7 +54,8 @@ struct ident {
struct ident *next; /* Hash chain of identifiers */
struct symbol *symbols; /* Pointer to semantic meaning list */
unsigned char len; /* Length of identifier name */
- unsigned char tainted;
+ unsigned char tainted:1,
+ reserved:1;
char name[]; /* Actual identifier */
};