From: Bernhard Urban Date: Mon, 17 May 2010 23:53:40 +0000 (+0200) Subject: codea: bugfix fuer ag-part... X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=uebersetzerbau-ss10.git;a=commitdiff_plain;h=9dee154b18cbd82c14f1e9b782de615396f76d2e codea: bugfix fuer ag-part... --- diff --git a/codea/symtable.c b/codea/symtable.c index b385000..f8e4f21 100755 --- a/codea/symtable.c +++ b/codea/symtable.c @@ -40,7 +40,7 @@ struct symbol *tab_add_symbol(struct symbol *tab, char *ident, short type, short exit(4); } - if(tab_lookup(tab, ident, type) != SYMNULL) { + if(tab_lookup(tab, ident, type) != SYMNULL || (type == S_VAR && tab_lookup(tab, ident, S_PARM) != SYMNULL)) { if(check) { fprintf(stderr, "Identifier doppelt vorhanden: \"%s\"\n", ident); exit(3); diff --git a/codea/tree.c b/codea/tree.c index 3669383..82d986a 100644 --- a/codea/tree.c +++ b/codea/tree.c @@ -107,6 +107,7 @@ static void write_indent(int i) void write_tree(struct treenode *node, int indent) { + if(node == TREENULL) return; write_indent(indent); fprintf(stderr, "%s @ %%%s (%i). \"%s\"\n", o_names[node->op], node->reg, node->exprcount, node->name == (char*) NULL ? "" : node->name); if(node->kids[0] != TREENULL) {