Added -Wunknown-pragmas

This commit is contained in:
Dale Weiler 2012-12-17 16:14:04 +00:00
parent 68e4fb87d8
commit 8e0515de44
3 changed files with 3 additions and 1 deletions

1
main.c
View file

@ -552,6 +552,7 @@ int main(int argc, char **argv) {
options_set(opts.warn, WARN_DOUBLE_DECLARATION, true); options_set(opts.warn, WARN_DOUBLE_DECLARATION, true);
options_set(opts.warn, WARN_CONST_VAR, true); options_set(opts.warn, WARN_CONST_VAR, true);
options_set(opts.warn, WARN_MULTIBYTE_CHARACTER, 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, ADJUST_VECTOR_FIELDS, true);
options_set(opts.flags, FTEPP, false); options_set(opts.flags, FTEPP, false);

View file

@ -66,6 +66,7 @@
GMQCC_DEFINE_FLAG(CONST_VAR) GMQCC_DEFINE_FLAG(CONST_VAR)
GMQCC_DEFINE_FLAG(MULTIBYTE_CHARACTER) GMQCC_DEFINE_FLAG(MULTIBYTE_CHARACTER)
GMQCC_DEFINE_FLAG(TERNARY_PRECEDENCE) GMQCC_DEFINE_FLAG(TERNARY_PRECEDENCE)
GMQCC_DEFINE_FLAG(UNKNOWN_PRAGMAS)
#endif #endif
#ifdef GMQCC_TYPE_OPTIMIZATIONS #ifdef GMQCC_TYPE_OPTIMIZATIONS

View file

@ -2479,7 +2479,7 @@ static bool parse_pragma_do(parser_t *parser)
} }
else else
{ {
parseerror(parser, "unrecognized hash-keyword: `%s`", parser_tokval(parser)); (void)!parsewarning(parser, WARN_UNKNOWN_PRAGMAS, "ignoring #pragma %s", parser_tokval(parser));
return false; return false;
} }