mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 12:00:38 +00:00
Add seperate warning flag for directive in macro.
This commit is contained in:
parent
8f359f3849
commit
90824c2093
3 changed files with 3 additions and 1 deletions
2
ftepp.c
2
ftepp.c
|
@ -1525,7 +1525,7 @@ static bool ftepp_else_allowed(ftepp_t *ftepp)
|
|||
|
||||
static GMQCC_INLINE void ftepp_inmacro(ftepp_t *ftepp, const char *hash) {
|
||||
if (ftepp->in_macro)
|
||||
(void)!ftepp_warn(ftepp, WARN_CPP, "`#%s` directive in macro", hash);
|
||||
(void)!ftepp_warn(ftepp, WARN_DIRECTIVE_INMACRO, "`#%s` directive in macro", hash);
|
||||
}
|
||||
|
||||
static bool ftepp_hash(ftepp_t *ftepp)
|
||||
|
|
1
opts.c
1
opts.c
|
@ -91,6 +91,7 @@ static void opts_setdefault(void) {
|
|||
opts_set(opts.warn, WARN_DEPRECATED, true);
|
||||
opts_set(opts.warn, WARN_PARENTHESIS, true);
|
||||
opts_set(opts.warn, WARN_CONST_OVERWRITE, true);
|
||||
opts_set(opts.warn, WARN_DIRECTIVE_INMACRO, true);
|
||||
|
||||
/* flags */
|
||||
opts_set(opts.flags, ADJUST_VECTOR_FIELDS, true);
|
||||
|
|
1
opts.def
1
opts.def
|
@ -95,6 +95,7 @@
|
|||
GMQCC_DEFINE_FLAG(UNSAFE_TYPES)
|
||||
GMQCC_DEFINE_FLAG(BREAKDEF)
|
||||
GMQCC_DEFINE_FLAG(CONST_OVERWRITE)
|
||||
GMQCC_DEFINE_FLAG(DIRECTIVE_INMACRO)
|
||||
#endif
|
||||
|
||||
#ifdef GMQCC_TYPE_OPTIMIZATIONS
|
||||
|
|
Loading…
Reference in a new issue