Just allow variable declarations in for-loop initializers in any standard...
authorWolfgang Bumiller <blub@speed.at>
Mon, 31 Dec 2012 11:35:26 +0000 (12:35 +0100)
committerWolfgang Bumiller <blub@speed.at>
Mon, 31 Dec 2012 11:35:26 +0000 (12:35 +0100)
parser.c

index 26a86858ba8f620d0620feaefcac830f45a056ca..97a4dffc5c40fbd071d7f0bc9c4903ffde0527b0 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -2412,11 +2412,13 @@ static bool parse_for_go(parser_t *parser, ast_block *block, ast_expression **ou
         typevar = parser_find_typedef(parser, parser_tokval(parser), 0);
 
     if (typevar || parser->tok == TOKEN_TYPENAME) {
+#if 0
         if (opts.standard != COMPILER_GMQCC) {
             if (parsewarning(parser, WARN_EXTENSIONS,
                              "current standard does not allow variable declarations in for-loop initializers"))
                 goto onerr;
         }
+#endif
         if (!parse_variable(parser, block, true, CV_VAR, typevar, false, false, 0, NULL))
             goto onerr;
     }