linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Print an error if typeof() lacks an argument
@ 2009-04-25 11:03 Martin Nagy
  2009-04-25 11:11 ` Martin Nagy
  2009-04-27  6:38 ` Christopher Li
  0 siblings, 2 replies; 4+ messages in thread
From: Martin Nagy @ 2009-04-25 11:03 UTC (permalink / raw)
  To: linux-sparse


We weren't checking if the initializer isn't NULL, which caused sparse
to segfault later on when performing lazy evaluation in classify_type().

Signed-off-by: Martin Nagy <nagy.martin@gmail.com>
---
 parse.c |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/parse.c b/parse.c
index 9662122..18cfaef 100644
--- a/parse.c
+++ b/parse.c
@@ -924,12 +924,17 @@ static struct token *typeof_specifier(struct token *token, struct decl_state *ct
 		ctx->ctype.base_type = sym->ctype.base_type;
 		apply_ctype(token->pos, &sym->ctype, &ctx->ctype);
 	} else {
-		struct symbol *typeof_sym = alloc_symbol(token->pos, SYM_TYPEOF);
-		token = parse_expression(token->next, &typeof_sym->initializer);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-27  9:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-25 11:03 [PATCH] Print an error if typeof() lacks an argument Martin Nagy
2009-04-25 11:11 ` Martin Nagy
2009-04-27  6:38 ` Christopher Li
2009-04-27  9:15   ` Martin Nagy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).