static void create_local_declaration(declaration_t *declaration)
{
+ if(declaration->symbol == NULL)
+ return;
+
type_t *type = skip_typeref(declaration->type);
switch ((storage_class_tag_t) declaration->storage_class) {
check_type_of_main(declaration, &type->function);
}
- declaration_t *const previous_declaration = get_declaration(symbol, namespc);
+ assert(declaration->symbol != NULL);
+ declaration_t *previous_declaration = get_declaration(symbol, namespc);
+
assert(declaration != previous_declaration);
if (previous_declaration != NULL) {
if (previous_declaration->parent_scope == scope) {
}
assert(declaration->parent_scope == NULL);
- assert(declaration->symbol != NULL);
assert(scope != NULL);
declaration->parent_scope = scope;
parse_declaration_specifiers(&specifiers);
if(token.type == ';') {
- parse_anonymous_declaration_rest(&specifiers, finished_declaration);
+ parse_anonymous_declaration_rest(&specifiers, append_declaration);
} else {
declaration_t *declaration = parse_declarator(&specifiers, /*may_be_abstract=*/false);
parse_declaration_rest(declaration, &specifiers, finished_declaration);