[pragma] Flesh out more

This commit is contained in:
Behdad Esfahbod 2019-01-17 18:36:10 -05:00
parent 7e6bd510fc
commit 1077e40bf1
1 changed files with 17 additions and 5 deletions

View File

@ -30,16 +30,28 @@
#define HB_HH #define HB_HH
#ifndef HB_NO_DIAGNOSTIC_PRAGMAS #ifndef HB_NO_DIAGNOSTIC_PRAGMAS
// Enable /* Rules:
* - We set all pragmas under GCC, even clang-specific ones. Clang
* still reads them.
* - Within each category, keep sorted.
*/
/* Setup */
#pragma GCC diagnostic ignored "-Wpragmas" // Must be first
#pragma GCC diagnostic warning "-Wall" #pragma GCC diagnostic warning "-Wall"
#pragma GCC diagnostic warning "-Wextra" #pragma GCC diagnostic warning "-Wextra"
#pragma GCC diagnostic warning "-Wunused" //#pragma GCC diagnostic warning "-Weverything"
#pragma GCC diagnostic warning "-Wcast-align" /* Error */
// Disable #pragma GCC diagnostic error "-Wcast-align"
#pragma GCC diagnostic error "-Wunused"
/* Warning */
/* Ignored */
#pragma GCC diagnostic ignored "-Wconversion" // TODO fix
#pragma GCC diagnostic ignored "-Wmissing-field-initializers" #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#pragma GCC diagnostic ignored "-Wpacked" // Erratic impl in clang
#pragma GCC diagnostic ignored "-Wshadow" // TODO fix
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#pragma GCC diagnostic ignored "-Wtype-limits" #pragma GCC diagnostic ignored "-Wtype-limits"
#pragma GCC diagnostic ignored "-Wunused-parameter" // TODO Fix #pragma GCC diagnostic ignored "-Wunused-parameter" // TODO Fix
#pragma GCC diagnostic ignored "-Wshadow" // TODO fix
#endif #endif
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H