From: Dale Weiler Date: Mon, 30 Sep 2013 19:59:36 +0000 (-0400) Subject: Add seperate warning flag for directive in macro. X-Git-Tag: 0.3.5~54 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=90824c209329d73b9bdad86177348d18562891ab;p=xonotic%2Fgmqcc.git Add seperate warning flag for directive in macro. --- diff --git a/ftepp.c b/ftepp.c index a2bbb68..050d6d8 100644 --- a/ftepp.c +++ b/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) diff --git a/opts.c b/opts.c index 9aa8f63..27d6a56 100644 --- a/opts.c +++ b/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); diff --git a/opts.def b/opts.def index f4d01e6..57625dd 100644 --- a/opts.def +++ b/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