]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
added -Wcpp (for turning off cpp warnings defined with #warning like GCC/clang/pathsc...
authorDale Weiler <killfieldengine@gmail.com>
Fri, 21 Dec 2012 03:12:58 +0000 (03:12 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Fri, 21 Dec 2012 03:12:58 +0000 (03:12 +0000)
ftepp.c
opts.c
opts.def

diff --git a/ftepp.c b/ftepp.c
index c7e4273c5f4f9495891c200d6256bfdb4748edc9..323514740cae1583ce113f0c8e66e0efd54925ca 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -1025,13 +1025,13 @@ static void ftepp_directive_warning(ftepp_t *ftepp) {
             ftepp_next(ftepp);
         }
         vec_push(message, '\0');
-        (void)!!ftepp_warn(ftepp, LVL_WARNING, message);
+        (void)!!ftepp_warn(ftepp, WARN_CPP, message);
         vec_free(message);
         return;
     }
 
     unescape  (ftepp_tokval(ftepp), ftepp_tokval(ftepp));
-    (void)!!ftepp_warn(ftepp, LVL_WARNING, "#warning %s", ftepp_tokval(ftepp));
+    (void)!!ftepp_warn(ftepp, WARN_CPP, "#warning %s", ftepp_tokval(ftepp));
 }
 
 static void ftepp_directive_error(ftepp_t *ftepp) {
diff --git a/opts.c b/opts.c
index a8e3e6c2e9d3cbf8ed93195804ce6d9995f5b5ee..6008fb1dfa55f0307eee6af56f4e3a12a3b94ae0 100644 (file)
--- a/opts.c
+++ b/opts.c
@@ -52,6 +52,7 @@ static void opts_setdefault() {
     opts_set(opts.warn,  WARN_MULTIBYTE_CHARACTER,       true);
     opts_set(opts.warn,  WARN_UNKNOWN_PRAGMAS,           true);
     opts_set(opts.warn,  WARN_UNREACHABLE_CODE,          true);
+    opts_set(opts.warn,  WARN_CPP,                       true);
     /* flags */
     opts_set(opts.flags, ADJUST_VECTOR_FIELDS,           true);
     opts_set(opts.flags, FTEPP,                          false);
index 87aaf360d2d4b4afbc22e51be1d2c664a61c33f8..9e53ff54ee55f380334a2ceb7ea78ed185f57ef4 100644 (file)
--- a/opts.def
+++ b/opts.def
@@ -72,6 +72,7 @@
     GMQCC_DEFINE_FLAG(TERNARY_PRECEDENCE)
     GMQCC_DEFINE_FLAG(UNKNOWN_PRAGMAS)
     GMQCC_DEFINE_FLAG(UNREACHABLE_CODE)
+    GMQCC_DEFINE_FLAG(CPP)
 #endif
 
 #ifdef GMQCC_TYPE_OPTIMIZATIONS