]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Added -Wunknown-pragmas
authorDale Weiler <killfieldengine@gmail.com>
Mon, 17 Dec 2012 16:14:04 +0000 (16:14 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Mon, 17 Dec 2012 16:14:43 +0000 (16:14 +0000)
main.c
opts.def
parser.c

diff --git a/main.c b/main.c
index 871e3e7ba02e0b5ffa8f6a3cfe682ae9ee9d35df..40322644b098115cf60b754204daec647110df6f 100644 (file)
--- a/main.c
+++ b/main.c
@@ -552,6 +552,7 @@ int main(int argc, char **argv) {
     options_set(opts.warn, WARN_DOUBLE_DECLARATION, true);
     options_set(opts.warn, WARN_CONST_VAR, true);
     options_set(opts.warn, WARN_MULTIBYTE_CHARACTER, true);
+    options_set(opts.warn, WARN_UNKNOWN_PRAGMAS, true);
 
     options_set(opts.flags, ADJUST_VECTOR_FIELDS, true);
     options_set(opts.flags, FTEPP, false);
index 79809b8327e50206fa689e64f318da809f1963a7..f1adc7a6a9197cbc21dd6ad70304215f2466cb33 100644 (file)
--- a/opts.def
+++ b/opts.def
@@ -66,6 +66,7 @@
     GMQCC_DEFINE_FLAG(CONST_VAR)
     GMQCC_DEFINE_FLAG(MULTIBYTE_CHARACTER)
     GMQCC_DEFINE_FLAG(TERNARY_PRECEDENCE)
+    GMQCC_DEFINE_FLAG(UNKNOWN_PRAGMAS)
 #endif
 
 #ifdef GMQCC_TYPE_OPTIMIZATIONS
index 4a1933bed1111ffdc28b077738bba9386e415989..8e5f8b0c651f0fdaf7b889b0ca95c5ed1c13bdb8 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -2479,7 +2479,7 @@ static bool parse_pragma_do(parser_t *parser)
     }
     else
     {
-        parseerror(parser, "unrecognized hash-keyword: `%s`", parser_tokval(parser));
+        (void)!parsewarning(parser, WARN_UNKNOWN_PRAGMAS, "ignoring #pragma %s", parser_tokval(parser));
         return false;
     }