From 5c05af9acae9d5b2d5fec8544f974d866335c2a6 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 23 Jan 2019 13:38:40 +0000 Subject: [PATCH] build: Add -Wno-pedantic flag to compiler arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We do not support building with -Wpedantic due pervasively casting function pointers through (void*) — see https://wiki.gnome.org/Projects/GLib/CompilerRequirements#Function_pointer_conversions. Signed-off-by: Philip Withnall Helps https://gitlab.gnome.org/GNOME/glib/issues/1662 --- meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meson.build b/meson.build index 04ca8c2b0..e8a5ae792 100644 --- a/meson.build +++ b/meson.build @@ -355,6 +355,9 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang' # Due to pervasive use of things like GPOINTER_TO_UINT(), we do not support # building with -Wbad-function-cast. '-Wno-bad-function-cast', + # Due to function casts through (void*) we cannot support -Wpedantic: + # https://wiki.gnome.org/Projects/GLib/CompilerRequirements#Function_pointer_conversions. + '-Wno-pedantic', '-Werror=declaration-after-statement', '-Werror=format=2', '-Werror=implicit-function-declaration',