projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6f440b
)
Ensure that references are initialised.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 19 Nov 2008 07:39:18 +0000
(07:39 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 19 Nov 2008 07:39:18 +0000
(07:39 +0000)
[r23792]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
703b860
..
29e5761
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-5199,6
+5199,10
@@
static void parse_declaration_rest(entity_t *ndeclaration,
if (token.type == '=') {
parse_init_declarator_rest(entity);
+ } else if (entity->kind == ENTITY_VARIABLE &&
+ is_type_reference(skip_typeref(entity->declaration.type))) {
+ errorf(&entity->base.source_position,
+ "reference %Y must be initialized", entity->base.symbol);
}
check_variable_type_complete(entity);