]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - parser.c
Remove license headers. The LICENSE file is sufficent
[xonotic/gmqcc.git] / parser.c
index 75014cb23607ab581341a36aaf424ed3d9af1b2b..0370146d5dde882e6332f3ee67b011c796034093 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1,26 +1,3 @@
-/*
- * Copyright (C) 2012, 2013, 2014, 2015
- *     Wolfgang Bumiller
- *     Dale Weiler
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is furnished to do
- * so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
 #include <string.h>
 #include <math.h>
 
@@ -426,18 +403,7 @@ static bool parser_sy_apply_operator(parser_t *parser, shunt *sy)
                 return false;
             }
             out = (ast_expression*)ast_array_index_new(ctx, exprs[0], exprs[1]);
-            if (rotate_entfield_array_index_nodes(&out))
-            {
-#if 0
-                /* This is not broken in fteqcc anymore */
-                if (OPTS_OPTION_U32(OPTION_STANDARD) != COMPILER_GMQCC) {
-                    /* this error doesn't need to make us bail out */
-                    (void)!parsewarning(parser, WARN_EXTENSIONS,
-                                        "accessing array-field members of an entity without parenthesis\n"
-                                        " -> this is an extension from -std=gmqcc");
-                }
-#endif
-            }
+            rotate_entfield_array_index_nodes(&out);
             break;
 
         case opid1(','):
@@ -1915,10 +1881,6 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma
         else if (!wantop) {
             if (!parse_sya_operand(parser, &sy, with_labels))
                 goto onerr;
-#if 0
-            if (vec_size(sy.paren) && vec_last(sy.ops).isparen && vec_last(sy.paren) == PAREN_FUNC)
-                vec_last(sy.argc)++;
-#endif
             wantop = true;
         }
         else {
@@ -2521,13 +2483,6 @@ 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_OPTION_U32(OPTION_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;
     }