mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-21 10:51:10 +00:00
GCC specific stuff compile flags.
This commit is contained in:
parent
ef528d6710
commit
c2b5a95961
3 changed files with 9 additions and 8 deletions
4
Makefile
4
Makefile
|
@ -10,7 +10,7 @@ CYGWIN = $(findstring CYGWIN, $(UNAME))
|
||||||
MINGW = $(findstring MINGW32, $(UNAME))
|
MINGW = $(findstring MINGW32, $(UNAME))
|
||||||
|
|
||||||
CC ?= clang
|
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),)
|
ifneq ($(shell git describe --always 2>/dev/null),)
|
||||||
CFLAGS += -DGMQCC_GITINFO="\"$(shell git describe --always)\""
|
CFLAGS += -DGMQCC_GITINFO="\"$(shell git describe --always)\""
|
||||||
endif
|
endif
|
||||||
|
@ -32,7 +32,7 @@ else
|
||||||
#Tiny C Compiler doesn't know what -pedantic-errors is
|
#Tiny C Compiler doesn't know what -pedantic-errors is
|
||||||
# and instead of ignoring .. just errors.
|
# and instead of ignoring .. just errors.
|
||||||
ifneq ($(CC), tcc)
|
ifneq ($(CC), tcc)
|
||||||
CFLAGS +=-pedantic-errors
|
CFLAGS +=-pedantic-errors -ffunction-sections -fdata-sections -Wl,-gc-sections
|
||||||
else
|
else
|
||||||
CFLAGS += -Wno-pointer-sign -fno-common
|
CFLAGS += -Wno-pointer-sign -fno-common
|
||||||
endif
|
endif
|
||||||
|
|
1
ftepp.c
1
ftepp.c
|
@ -394,6 +394,7 @@ static bool ftepp_define_params(ftepp_t *ftepp, ppmacro *macro)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} while (ftepp->token == ',');
|
} while (ftepp->token == ',');
|
||||||
|
|
||||||
if (ftepp->token != ')') {
|
if (ftepp->token != ')') {
|
||||||
ftepp_error(ftepp, "expected closing paren after macro parameter list");
|
ftepp_error(ftepp, "expected closing paren after macro parameter list");
|
||||||
return false;
|
return false;
|
||||||
|
|
12
lexer.c
12
lexer.c
|
@ -495,13 +495,13 @@ unroll:
|
||||||
vec_free(command);
|
vec_free(command);
|
||||||
lex_ungetch(lex, ' ');
|
lex_ungetch(lex, ' ');
|
||||||
}
|
}
|
||||||
if (command) {
|
if (param) {
|
||||||
vec_pop(command);
|
vec_pop(param);
|
||||||
while (vec_size(command)) {
|
while (vec_size(param)) {
|
||||||
lex_ungetch(lex, (unsigned char)vec_last(command));
|
lex_ungetch(lex, (unsigned char)vec_last(param));
|
||||||
vec_pop(command);
|
vec_pop(param);
|
||||||
}
|
}
|
||||||
vec_free(command);
|
vec_free(param);
|
||||||
lex_ungetch(lex, ' ');
|
lex_ungetch(lex, ' ');
|
||||||
}
|
}
|
||||||
if (pragma) {
|
if (pragma) {
|
||||||
|
|
Loading…
Reference in a new issue