[pragma] More

This commit is contained in:
Behdad Esfahbod 2019-01-18 09:46:17 -05:00
parent 2bd530d598
commit 16e5ba85b1
1 changed files with 16 additions and 1 deletions

View File

@ -36,17 +36,23 @@
* - Warnings whose scope can be expanded in future compiler versions shall * - Warnings whose scope can be expanded in future compiler versions shall
* be declared as "warning". Otherwise, either ignored or error. * be declared as "warning". Otherwise, either ignored or error.
*/ */
/* Setup */ /* Setup */
#pragma GCC diagnostic warning "-Wall" #pragma GCC diagnostic warning "-Wall"
#pragma GCC diagnostic warning "-Wextra" #pragma GCC diagnostic warning "-Wextra"
#pragma GCC diagnostic ignored "-Wpragmas" #pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wunknown-warning-option" #pragma clang diagnostic ignored "-Wunknown-warning-option"
//#pragma GCC diagnostic warning "-Weverything" //#pragma GCC diagnostic warning "-Weverything"
/* Error. Should never happen. */ /* Error. Should never happen. */
#pragma clang diagnostic error "-Wc++11-narrowing"
#pragma clang diagnostic error "-Wstring-conversion"
#pragma clang diagnostic error "-Wtautological-overlap-compare"
#pragma GCC diagnostic error "-Wcast-align" #pragma GCC diagnostic error "-Wcast-align"
#pragma GCC diagnostic error "-Wformat-security" #pragma GCC diagnostic error "-Wformat-security"
#pragma GCC diagnostic error "-Winit-self"
#pragma GCC diagnostic error "-Wimplicit-function-declaration" #pragma GCC diagnostic error "-Wimplicit-function-declaration"
#pragma GCC diagnostic error "-Winit-self"
#pragma GCC diagnostic error "-Wmissing-braces" #pragma GCC diagnostic error "-Wmissing-braces"
#pragma GCC diagnostic error "-Wmissing-declarations" #pragma GCC diagnostic error "-Wmissing-declarations"
#pragma GCC diagnostic error "-Wmissing-prototypes" #pragma GCC diagnostic error "-Wmissing-prototypes"
@ -56,9 +62,16 @@
#pragma GCC diagnostic error "-Wredundant-decls" #pragma GCC diagnostic error "-Wredundant-decls"
#pragma GCC diagnostic error "-Wstrict-prototypes" #pragma GCC diagnostic error "-Wstrict-prototypes"
#pragma GCC diagnostic error "-Wswitch-enum" #pragma GCC diagnostic error "-Wswitch-enum"
#pragma GCC diagnostic error "-Wunneeded-internal-declaration"
#pragma GCC diagnostic error "-Wunused" #pragma GCC diagnostic error "-Wunused"
#pragma GCC diagnostic error "-Wunused-local-typedefs"
#pragma GCC diagnostic error "-Wunused-value"
#pragma GCC diagnostic error "-Wunused-variable"
#pragma GCC diagnostic error "-Wwrite-strings" #pragma GCC diagnostic error "-Wwrite-strings"
/* Warning. To be investigated if happens. */ /* Warning. To be investigated if happens. */
#pragma clang diagnostic warning "-Wignored-pragma-optimize"
#pragma GCC diagnostic warning "-Wbuiltin-macro-redefined"
#pragma GCC diagnostic warning "-Wdisabled-optimization" #pragma GCC diagnostic warning "-Wdisabled-optimization"
#pragma GCC diagnostic warning "-Wformat=2" #pragma GCC diagnostic warning "-Wformat=2"
#pragma GCC diagnostic warning "-Wlogical-op" #pragma GCC diagnostic warning "-Wlogical-op"
@ -66,12 +79,14 @@
#pragma GCC diagnostic warning "-Wsign-compare" #pragma GCC diagnostic warning "-Wsign-compare"
#pragma GCC diagnostic warning "-Wundef" #pragma GCC diagnostic warning "-Wundef"
#pragma GCC diagnostic warning "-Wvla" #pragma GCC diagnostic warning "-Wvla"
/* Ignored currently, but should be fixed at some point. */ /* Ignored currently, but should be fixed at some point. */
#pragma GCC diagnostic ignored "-Wconversion" // TODO fix #pragma GCC diagnostic ignored "-Wconversion" // TODO fix
#pragma GCC diagnostic ignored "-Wformat-signedness" // TODO fix #pragma GCC diagnostic ignored "-Wformat-signedness" // TODO fix
#pragma GCC diagnostic ignored "-Wshadow" // TODO fix #pragma GCC diagnostic ignored "-Wshadow" // TODO fix
#pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations" // TODO fix #pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations" // TODO fix
#pragma GCC diagnostic ignored "-Wunused-parameter" // TODO fix #pragma GCC diagnostic ignored "-Wunused-parameter" // TODO fix
/* Ignored intentionally. */ /* Ignored intentionally. */
#pragma clang diagnostic ignored "-Wclass-memaccess" #pragma clang diagnostic ignored "-Wclass-memaccess"
#pragma GCC diagnostic ignored "-Wformat-nonliteral" #pragma GCC diagnostic ignored "-Wformat-nonliteral"