]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - main.c
this should be tagged 0.2.9
[xonotic/gmqcc.git] / main.c
diff --git a/main.c b/main.c
index d89ed27b043efcb62d9f350f34ff385d67ddd456..bbc685a05fdb69bb2b8e7d31071e7d620468df58 100644 (file)
--- a/main.c
+++ b/main.c
@@ -44,18 +44,13 @@ static ppitem  *ppems = NULL;
 static const char *app_name;
 
 static void version() {
-    con_out("GMQCC %d.%d.%d Built %s %s\n",
+    con_out("GMQCC %d.%d.%d Built %s %s\n" GMQCC_DEV_VERSION_STRING,
         GMQCC_VERSION_MAJOR,
         GMQCC_VERSION_MINOR,
         GMQCC_VERSION_PATCH,
         __DATE__,
         __TIME__
     );
-#ifdef GMQCC_GITINFO
-    con_out("git build: %s\n", GMQCC_GITINFO);
-#elif defined(GMQCC_VERION_TYPE_DEVEL)
-    con_out("development build\n");
-#endif
 }
 
 static int usage() {
@@ -173,6 +168,7 @@ static bool options_parse(int argc, char **argv) {
                     opts_set(opts.flags, INITIALIZED_NONCONSTANTS,      true);
                     opts_set(opts.werror, WARN_INVALID_PARAMETER_COUNT, true);
                     opts_set(opts.werror, WARN_MISSING_RETURN_VALUES,   true);
+                    opts_set(opts.flags,  EXPRESSIONS_FOR_BUILTINS,     true);
 
 
                     OPTS_OPTION_U32(OPTION_STANDARD) = COMPILER_GMQCC;
@@ -643,9 +639,6 @@ int main(int argc, char **argv) {
         }
     }
 
-    if (OPTS_FLAG(TRUE_EMPTY_STRINGS))
-        type_not_instr[TYPE_STRING] = INSTR_NOT_F;
-
     util_debug("COM", "starting ...\n");
 
     /* add macros */
@@ -765,6 +758,7 @@ srcdone:
         }
 
         ftepp_finish(ftepp);
+        ftepp = NULL;
         if (!OPTS_OPTION_BOOL(OPTION_PP_ONLY)) {
             if (!parser_finish(parser, OPTS_OPTION_STR(OPTION_OUTPUT))) {
                 retval = 1;
@@ -786,7 +780,8 @@ srcdone:
 
 cleanup:
     util_debug("COM", "cleaning ...\n");
-    ftepp_finish(ftepp);
+    if (ftepp)
+        ftepp_finish(ftepp);
     con_close();
     vec_free(items);
     vec_free(ppems);