X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=expr.c;h=5c7fc8760437375850a2b60ee4496ab8cee60def;hp=9eeb6e7662c28f2d4d2538eb014ad0b4c3048700;hb=090bda1c00a18b3f616e734090ba456a461879a1;hpb=d95ee7f628ceac9af515079fb6797476557a23d2 diff --git a/expr.c b/expr.c index 9eeb6e7..5c7fc87 100644 --- a/expr.c +++ b/expr.c @@ -370,8 +370,11 @@ if (symbol) symbol->sattr |= REFERENCED; - // Check for undefined register equates - if (symbol->sattre & UNDEF_EQUR) + // Check for undefined register equates, but only if it's not part + // of a # construct, as it could be that the label that's + // been undefined may later be used as an address label--which + // means it will be fixed up later, and thus, not an error. + if ((symbol->sattre & UNDEF_EQUR) && !riscImmTokenSeen) { errors("undefined register equate '%s'", symbol->sname); //if we return right away, it returns some spurious errors... @@ -423,7 +426,7 @@ thrown away right here. What the hell is it for? } else { - // Unknown type here... Alert the user! + // Unknown type here... Alert the user!, error("undefined RISC register in expression"); // Prevent spurious error reporting... tok++;