projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af3bbb4
)
Do not panic, when finding a typedef name, when an expression is expected.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Tue, 4 Nov 2008 14:51:53 +0000
(14:51 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Tue, 4 Nov 2008 14:51:53 +0000
(14:51 +0000)
[r23433]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
a808c1d
..
c1709fc
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-6604,6
+6604,11
@@
static expression_t *parse_reference(void)
orig_type = entity->declaration.type;
} else if (entity->kind == ENTITY_ENUM_VALUE) {
orig_type = entity->enum_value.enum_type;
+ } else if (entity->kind == ENTITY_TYPEDEF) {
+ errorf(HERE, "encountered typedef name '%Y' while parsing expression",
+ symbol);
+ next_token();
+ return create_invalid_expression();
} else {
panic("expected declaration or enum value in reference");
}