]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
fix: dotranslate now sets AST_FLAG_INCLUDE_DEF to not get removed by -Ostrip-constant...
authorWolfgang Bumiller <wry.git@bumiller.com>
Sat, 1 Jun 2013 16:16:50 +0000 (18:16 +0200)
committerWolfgang Bumiller <wry.git@bumiller.com>
Sat, 1 Jun 2013 16:16:50 +0000 (18:16 +0200)
parser.c

index 7fba786c9cead285969038375c0e801cbc4f24b3..1b9e7c71a018039a8ad632d8046856bc308ba24b 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -266,6 +266,7 @@ static ast_value* parser_const_string(parser_t *parser, const char *str, bool do
             char name[32];
             util_snprintf(name, sizeof(name), "dotranslate_%lu", (unsigned long)(parser->translated++));
             ast_value_set_name(out, name);
+            out->expression.flags |= AST_FLAG_INCLUDE_DEF;
         }
         return out;
     }
@@ -284,6 +285,7 @@ static ast_value* parser_const_string(parser_t *parser, const char *str, bool do
     out->cvq      = CV_CONST;
     out->hasvalue = true;
     out->isimm    = true;
+    out->expression.flags |= AST_FLAG_INCLUDE_DEF;
     out->constval.vstring = parser_strdup(str);
     vec_push(parser->imm_string, out);
     util_htseth(parser->ht_imm_string, str, hash, out);