mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-28 02:20:04 +01:00
Check GCC version before ignoring diagnostic message
The `alloc-size-larger-than` warning is available starting with GCC 7, and using it in a pragma will generate a warning on older versions of GCC.
This commit is contained in:
parent
6cb6b418bf
commit
eb55d6413d
@ -21,7 +21,7 @@
|
||||
|
||||
/* We test for errors in optimize-only definitions in gmem.h */
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if defined(__GNUC__) && __GNUC__ > 6
|
||||
#pragma GCC optimize (1)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Walloc-size-larger-than="
|
||||
|
Loading…
x
Reference in New Issue
Block a user