projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a71b896
)
don't abort if symbol is NULL in record_declaration
author
Matthias Braun
<matze@braunis.de>
Thu, 27 Nov 2008 10:01:14 +0000
(10:01 +0000)
committer
Matthias Braun
<matze@braunis.de>
Thu, 27 Nov 2008 10:01:14 +0000
(10:01 +0000)
[r24039]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
0eccfe0
..
4952bc5
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-4893,7
+4893,10
@@
static entity_t *record_entity(entity_t *entity, const bool is_definition)
const namespace_tag_t namespc = (namespace_tag_t)entity->base.namespc;
const source_position_t *pos = &entity->base.source_position;
- assert(symbol != NULL);
+ /* can happen in error cases */
+ if (symbol == NULL)
+ return entity;
+
entity_t *previous_entity = get_entity(symbol, namespc);
/* pushing the same entity twice will break the stack structure */
assert(previous_entity != entity);