entity->declaration.declared_storage_class = STORAGE_CLASS_EXTERN;
entity->declaration.type = function_type;
entity->declaration.implicit = true;
+ entity->base.namespc = NAMESPACE_NORMAL;
entity->base.symbol = symbol;
entity->base.source_position = builtin_source_position;
static entity_t *get_entity(const symbol_t *const symbol,
namespace_tag_t namespc)
{
+ assert(namespc != NAMESPACE_INVALID);
entity_t *entity = symbol->entity;
for (; entity != NULL; entity = entity->base.symbol_next) {
if (entity->base.namespc == namespc)
entity_t *entity = allocate_entity_zero(ENTITY_ENUM_VALUE);
entity->enum_value.enum_type = enum_type;
+ entity->base.namespc = NAMESPACE_NORMAL;
entity->base.symbol = token.symbol;
entity->base.source_position = token.source_position;
next_token();
static entity_t *create_error_entity(symbol_t *symbol, entity_kind_tag_t kind)
{
entity_t *entity = allocate_entity_zero(kind);
+ entity->base.namespc = NAMESPACE_NORMAL;
entity->base.source_position = *HERE;
entity->base.symbol = symbol;
if (is_declaration(entity)) {
entity_t *entity;
if (specifiers->storage_class == STORAGE_CLASS_TYPEDEF) {
entity = allocate_entity_zero(ENTITY_TYPEDEF);
+ entity->base.namespc = NAMESPACE_NORMAL;
entity->base.symbol = env.symbol;
entity->base.source_position = env.source_position;
entity->typedefe.type = orig_type;
entity->declaration.declared_storage_class = STORAGE_CLASS_EXTERN;
entity->declaration.type = type;
entity->declaration.implicit = true;
+ entity->base.namespc = NAMESPACE_NORMAL;
entity->base.symbol = symbol;
entity->base.source_position = *source_position;