Good catch, can you please try the following patch?
Chris
Fix double semicolon in struct declare
Pavel discover this test case:
#include <string.h>
void test(void)
{
struct { int foo;; } val;
memset(&val, 0, sizeof(val));
}
Sparse creates a member with empty ctype. We should skip that.
Signed-Off-By: Christopher Li<[EMAIL PROTECTED]>
Index: sparse/parse.c
===================================================================
--- sparse.orig/parse.c 2007-01-29 14:46:09.000000000 -0800
+++ sparse/parse.c 2007-01-30 23:11:42.000000000 -0800
@@ -1039,7 +1039,8 @@ static struct token *struct_declaration_
sparse_error(token->pos, "expected ; at end of
declaration");
break;
}
- token = token->next;
+ while(match_op(token, ';'))
+ token = token->next;
}
return token;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html