#include "complain.h"
#include "symlist.h"
-
/*--------------------------------------.
| Create a list containing SYM at LOC. |
`--------------------------------------*/
symbol_list *res = xmalloc (sizeof *res);
res->content_type = SYMLIST_TYPE;
- res->content.type_name = type_name;
+ res->content.sem_type = xmalloc (sizeof (semantic_type));
+ res->content.sem_type->tag = type_name;
+ res->content.sem_type->location = loc;
+ res->content.sem_type->status = undeclared;
+
res->location = res->sym_loc = loc;
res->named_ref = NULL;
res->next = NULL;
l = symbol_list_n_get (l, n);
if (!l)
{
- complain_at (loc, _("invalid $ value: $%d"), n);
+ complain_at (loc, complaint, _("invalid $ value: $%d"), n);
return NULL;
}
aver (l->content_type == SYMLIST_SYMBOL);
break;
case SYMLIST_TYPE:
semantic_type_code_props_set
- (semantic_type_get (node->content.type_name),
+ (semantic_type_get (node->content.sem_type->tag,
+ &node->content.sem_type->location),
kind, &cprops);
+ if (node->content.sem_type->status == undeclared)
+ node->content.sem_type->status = used;
break;
case SYMLIST_DEFAULT_TAGGED:
default_tagged_code_props_set (kind, &cprops);