]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
GCC specific stuff compile flags.
authorDale Weiler <killfieldengine@gmail.com>
Mon, 15 Apr 2013 06:23:13 +0000 (06:23 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Mon, 15 Apr 2013 06:23:13 +0000 (06:23 +0000)
Makefile
ftepp.c
lexer.c

index 41ae2e6c112d171f183ab5d4673300f5129c6422..20152c5bf3f6cfa361066c45a33cf097d3917a73 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ CYGWIN  = $(findstring CYGWIN,  $(UNAME))
 MINGW   = $(findstring MINGW32, $(UNAME))
 
 CC     ?= clang
-CFLAGS += -Wall -Wextra -Werror -I. -fno-strict-aliasing -fsigned-char -ffunction-sections -fdata-sections -Wl,-gc-sections $(OPTIONAL)
+CFLAGS += -Wall -Wextra -Werror -I. -fno-strict-aliasing -fsigned-char $(OPTIONAL)
 ifneq ($(shell git describe --always 2>/dev/null),)
     CFLAGS += -DGMQCC_GITINFO="\"$(shell git describe --always)\""
 endif
@@ -32,7 +32,7 @@ else
        #Tiny C Compiler doesn't know what -pedantic-errors is
        # and instead of ignoring .. just errors.
        ifneq ($(CC), tcc)
-               CFLAGS +=-pedantic-errors
+               CFLAGS +=-pedantic-errors -ffunction-sections -fdata-sections -Wl,-gc-sections
        else
                CFLAGS += -Wno-pointer-sign -fno-common
        endif
diff --git a/ftepp.c b/ftepp.c
index af3e699d59a716c8c47dca049bc3ca74d345b97b..87be73881c4ecbd10f0a29b562df00b1e4fada67 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -394,6 +394,7 @@ static bool ftepp_define_params(ftepp_t *ftepp, ppmacro *macro)
             return false;
         }
     } while (ftepp->token == ',');
+
     if (ftepp->token != ')') {
         ftepp_error(ftepp, "expected closing paren after macro parameter list");
         return false;
diff --git a/lexer.c b/lexer.c
index 8d6f09442bb0d2b76e4ba6e314d923d17a2743ec..6f9def80dbf103511051a1f46663360a0e3c3a21 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -495,13 +495,13 @@ unroll:
         vec_free(command);
         lex_ungetch(lex, ' ');
     }
-    if (command) {
-        vec_pop(command);
-        while (vec_size(command)) {
-            lex_ungetch(lex, (unsigned char)vec_last(command));
-            vec_pop(command);
+    if (param) {
+        vec_pop(param);
+        while (vec_size(param)) {
+            lex_ungetch(lex, (unsigned char)vec_last(param));
+            vec_pop(param);
         }
-        vec_free(command);
+        vec_free(param);
         lex_ungetch(lex, ' ');
     }
     if (pragma) {