diff options
author | 2008-02-22 23:05:15 +0000 | |
---|---|---|
committer | 2008-04-03 13:32:01 -0700 | |
commit | 8ad1087c5947c49dafb7566df32c86b1eb51ccc4 (patch) | |
tree | dd3ca3926fa20f010f587ce6e89ed710161a21ab /show-parse.c | |
parent | Makefile: VERSION=0.4.1 (diff) | |
download | sparse-8ad1087c5947c49dafb7566df32c86b1eb51ccc4.tar.gz sparse-8ad1087c5947c49dafb7566df32c86b1eb51ccc4.tar.bz2 sparse-8ad1087c5947c49dafb7566df32c86b1eb51ccc4.zip |
saner warnings for restricted types
* don't crap the type->ident for unsigned int just because somebody did
typedef unsigned int x;
only structs, unions, enums and restricted types need it.
* generate saner warnings for restricted, include type name(s) into them.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'show-parse.c')
-rw-r--r-- | show-parse.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/show-parse.c b/show-parse.c index 9a1f796..b9a2828 100644 --- a/show-parse.c +++ b/show-parse.c @@ -309,6 +309,10 @@ static void do_show_type(struct symbol *sym, struct type_name *name, break; case SYM_RESTRICT: + if (sym->ident) { + prepend(name, "restricted %s ", show_ident(sym->ident)); + return; + } break; case SYM_FOULED: |