diff --git a/tools/qfcc/source/qfcc.c b/tools/qfcc/source/qfcc.c index 2075add76..0a32aaf32 100644 --- a/tools/qfcc/source/qfcc.c +++ b/tools/qfcc/source/qfcc.c @@ -405,8 +405,14 @@ finish_compilation (void) for (d = pr.scope->head; d; d = d->def_next) { if (d->external && d->refs) { - errors = true; - error (0, "undefined global %s", d->name); + if (strcmp (d->name, ".self") == 0) { + get_def (d->type, ".self", pr.scope, st_global); + } else if (strcmp (d->name, ".this") == 0) { + get_def (d->type, ".this", pr.scope, st_global); + } else { + errors = true; + error (0, "undefined global %s", d->name); + } } } if (errors)