Lines Matching refs:sym
44 void set_current_scope(struct symbol *sym)
46 sym->scope = block_scope;
49 void bind_scope(struct symbol *sym, struct scope *scope)
51 sym->scope = scope;
52 add_symbol(&scope->symbols, sym);
56 void rebind_scope(struct symbol *sym, struct scope *new)
58 struct scope *old = sym->scope;
64 delete_ptr_list_entry((struct ptr_list**) &old->symbols, sym, 1);
66 bind_scope(sym, new);
100 static void remove_symbol_scope(struct symbol *sym)
102 struct symbol **ptr = &sym->ident->symbols;
104 while (*ptr != sym)
106 *ptr = sym->next_id;
113 struct symbol *sym;
117 FOR_EACH_PTR(symbols, sym) {
118 remove_symbol_scope(sym);
119 } END_FOR_EACH_PTR(sym);
153 struct symbol *sym;
155 FOR_EACH_PTR(label_scope->symbols, sym) {
156 if (!sym->stmt || sym->used)
158 if (sym->label_modifiers & MOD_UNUSED)
160 warning(sym->pos, "unused label '%s'", show_ident(sym->ident));
161 } END_FOR_EACH_PTR(sym);