]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - main.c
Track constant folds in opts_optimization list .. this could be handled better I...
[xonotic/gmqcc.git] / main.c
diff --git a/main.c b/main.c
index 1718e32972ec7e4e90c0be79bdb03fe3f5a91652..48ff96e237c644b24f430cf5b3d9ee69f9de12e1 100644 (file)
--- a/main.c
+++ b/main.c
@@ -426,7 +426,8 @@ static bool options_parse(int argc, char **argv) {
                         else if (!strcmp(argarg, "ALL"))
                             opts_setoptimlevel(OPTS_OPTION_U32(OPTION_O) = 9999);
                         else if (!strncmp(argarg, "NO_", 3)) {
-                            if (!opts_setoptim(argarg+3, false)) {
+                            /* constant folding cannot be turned off for obvious reasons */
+                            if (!strcmp(argarg, "NO_CONST_FOLD") || !opts_setoptim(argarg+3, false)) {
                                 con_out("unknown optimization: %s\n", argarg+3);
                                 return false;
                             }