]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
-g sets opts.g and -debug causes blocks to be labeled
authorWolfgang Bumiller <blub@speed.at>
Thu, 20 Dec 2012 15:04:10 +0000 (16:04 +0100)
committerWolfgang Bumiller <blub@speed.at>
Thu, 20 Dec 2012 15:04:10 +0000 (16:04 +0100)
ast.c
main.c

diff --git a/ast.c b/ast.c
index 51104b31685c294b333fd4cc3b7e5b2472b1f6e4..5cb8651d6d5b1e9428c5e3824ee26ce631e277ce 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1049,7 +1049,7 @@ const char* ast_function_label(ast_function *self, const char *prefix)
     size_t len;
     char  *from;
 
-    if (!opts.dump && !opts.dumpfin)
+    if (!opts.dump && !opts.dumpfin && !opts.debug)
         return NULL;
 
     id  = (self->labelcount++);
diff --git a/main.c b/main.c
index 00d3bc835390a6cfca82836e35118cd663c85f7d..6a0fe1667a60a740fd7db2cd23323edaaa0c787b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -266,6 +266,7 @@ static bool options_parse(int argc, char **argv) {
                 /* debug turns on -flno */
                 case 'g':
                     opts_setflag("LNO", true);
+                    opts.g = true;
                     break;
 
                 case 'D':