aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-11 11:00:04 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:02:38 -0700
commit38f0b639adebabc25f5e9f12255b8ab6a681dd6a (patch)
tree2793ed6d49f45bd40df030b4491e2ce8642c7fb7
parent8fae62236344076f8f0113ed21bedaf45ccec43d (diff)
downloadsparse-dev-38f0b639adebabc25f5e9f12255b8ab6a681dd6a.tar.gz
Add "__word__" mode attribute and fix __QI__.
Lack of __word__ noted by Dave Jones.
-rw-r--r--parse.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index 5eb47576..42f43186 100644
--- a/parse.c
+++ b/parse.c
@@ -256,7 +256,7 @@ static const char * handle_attribute(struct ctype *ctype, struct ident *attribut
*/
if (match_string_ident(ident, "__QI__") ||
match_string_ident(ident, "QI")) {
- ctype->modifiers |= MOD_SHORT;
+ ctype->modifiers |= MOD_CHAR;
ctype->base_type = ctype_integer(ctype->modifiers);
return NULL;
}
@@ -277,6 +277,12 @@ static const char * handle_attribute(struct ctype *ctype, struct ident *attribut
ctype->base_type = ctype_integer(ctype->modifiers);
return NULL;
}
+ if (match_string_ident(ident, "__word__") ||
+ match_string_ident(ident, "word")) {
+ ctype->modifiers |= MOD_LONG;
+ ctype->base_type = ctype_integer(ctype->modifiers);
+ return NULL;
+ }
return "unknown mode attribute";
}
return "expected attribute mode symbol";