aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2008-02-22 23:05:15 +0000
committerJosh Triplett <josh@freedesktop.org>2008-04-03 13:32:01 -0700
commit8ad1087c5947c49dafb7566df32c86b1eb51ccc4 (patch)
treedd3ca3926fa20f010f587ce6e89ed710161a21ab /show-parse.c
parentMakefile: VERSION=0.4.1 (diff)
downloadsparse-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.c4
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: