]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.c
Make compiler and virtual-machine compile as C++ code, also removed gmqcc_voidptr...
[xonotic/gmqcc.git] / ast.c
diff --git a/ast.c b/ast.c
index 5dc131ea38bc617289aac9a5dae09d91985502d0..09c12a4c6957ce0efbe963a2083a389c9181002c 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1098,9 +1098,9 @@ bool ast_value_codegen(ast_value *self, ast_function *func, bool lvalue, ir_valu
      * on all the globals.
      */
     if (!self->ir_v) {
-        char typename[1024];
-        ast_type_to_string((ast_expression*)self, typename, sizeof(typename));
-        compile_error(ast_ctx(self), "ast_value used before generated %s %s", typename, self->name);
+        char tname[1024]; /* typename is reserved in C++ */
+        ast_type_to_string((ast_expression*)self, tname, sizeof(tname));
+        compile_error(ast_ctx(self), "ast_value used before generated %s %s", tname, self->name);
         return false;
     }
     *out = self->ir_v;