From: Christoph Mallon Date: Thu, 18 Sep 2008 22:30:18 +0000 (+0000) Subject: Make stray ; outside of functions an error in strict mode. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=c95541eef5047a513ae346a122d46824ca967f8f;p=cparser Make stray ; outside of functions an error in strict mode. [r22102] --- diff --git a/parser.c b/parser.c index 14a84c4..5f76904 100644 --- a/parser.c +++ b/parser.c @@ -9984,10 +9984,12 @@ static void parse_translation_unit(void) return; case ';': - /* TODO error in strict mode */ - warningf(HERE, "stray ';' outside of function"); - next_token(); - break; + if (!strict_mode) { + warningf(HERE, "stray ';' outside of function"); + next_token(); + break; + } + /* FALLTHROUGH */ default: errorf(HERE, "stray %K outside of function", &token);