[pragma] Only add if GCC or clang

This commit is contained in:
Behdad Esfahbod 2019-01-18 14:53:54 -05:00
parent c2ea7a9da4
commit f13b6786f0
1 changed files with 3 additions and 0 deletions

View File

@ -30,6 +30,7 @@
#define HB_HH
#ifndef HB_NO_DIAGNOSTIC_PRAGMAS
#if defined(__GNUC__) || defined(__clang__)
/* Rules:
*
* - All pragmas are declared GCC even if they are clang ones. Otherwise GCC
@ -102,6 +103,8 @@
#pragma GCC diagnostic ignored "-Wpacked" // Erratic impl in clang
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#pragma GCC diagnostic ignored "-Wtype-limits"
#endif
#endif
#ifdef HAVE_CONFIG_H