* symrec.c (symtab_parser_finalize_checksym): Remove cruft that snuck into

previous commit.

svn path=/trunk/yasm/; revision=1233
0.5.0rc2
Peter Johnson 19 years ago
parent 2f05bb6099
commit f4d46c4e7f
  1. 5
      libyasm/symrec.c

@ -291,15 +291,10 @@ typedef struct symtab_finalize_info {
static int static int
symtab_parser_finalize_checksym(yasm_symrec *sym, /*@null@*/ void *d) symtab_parser_finalize_checksym(yasm_symrec *sym, /*@null@*/ void *d)
{ {
unsigned long *firstundef_line = d;
symtab_finalize_info *info = (symtab_finalize_info *)d; symtab_finalize_info *info = (symtab_finalize_info *)d;
/* error if a symbol is used but never defined or extern/common declared */ /* error if a symbol is used but never defined or extern/common declared */
if ((sym->status & SYM_USED) && !(sym->status & SYM_DEFINED) && if ((sym->status & SYM_USED) && !(sym->status & SYM_DEFINED) &&
!(sym->visibility & (YASM_SYM_EXTERN | YASM_SYM_COMMON))) { !(sym->visibility & (YASM_SYM_EXTERN | YASM_SYM_COMMON))) {
yasm__error(sym->line, N_("undefined symbol `%s' (first use)"),
sym->name);
if (sym->line < *firstundef_line)
*firstundef_line = sym->line;
if (info->undef_extern && info->objfmt) if (info->undef_extern && info->objfmt)
yasm_objfmt_extern_declare(info->objfmt, sym->name, NULL, 1); yasm_objfmt_extern_declare(info->objfmt, sym->name, NULL, 1);
else { else {

Loading…
Cancel
Save