From: Dale Weiler Date: Thu, 30 May 2013 18:22:37 +0000 (+0000) Subject: Merge branch 'cooking' into diagnostics X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=de6213fc141e4659aa49dd01963d1c0eb5b83576;p=xonotic%2Fgmqcc.git Merge branch 'cooking' into diagnostics --- de6213fc141e4659aa49dd01963d1c0eb5b83576 diff --cc main.c index 158d818,840a6a7..10db6d3 --- a/main.c +++ b/main.c @@@ -780,14 -778,11 +778,15 @@@ srcdone } } } - +{ + #define FOO "\xD\xE\xA\xD\xB\xE\xE\xF\xD\xE\xA\xD\xB\xE\xE\xF" + char *foo = util_strdup(FOO FOO FOO FOO "hello world!"); + (void)foo; +} cleanup: util_debug("COM", "cleaning ...\n"); - ftepp_finish(); + if (ftepp) + ftepp_finish(ftepp); con_close(); vec_free(items); vec_free(ppems); diff --cc parser.c index 3c63d91,d9be036..7918f0f --- a/parser.c +++ b/parser.c @@@ -5764,13 -5685,9 +5863,13 @@@ skipvar } } - if (parser->tok != '{') { + if (parser->tok != '{' || var->expression.vtype != TYPE_FUNCTION) { if (parser->tok != '=') { - parseerror(parser, "missing semicolon or initializer, got: `%s`", parser_tokval(parser)); + const char *obtain = parser_tokval(parser); + if (!strcmp(obtain, "}")) + parseerror(parser, "missing semicolon"); + else + parseerror(parser, "missing initializer"); break; }