gio-launch-desktop: clang compiler can't compile with commit 813ce7f0
The clang compiler does not like the gio-launch-desktop: preserve static_assert message commit (813ce7f0). Result:
[499/1350] Compiling C object gio/gio-launch-desktop.p/gio-launch-desktop.c.o
FAILED: gio/gio-launch-desktop.p/gio-launch-desktop.c.o
clang -Igio/gio-launch-desktop.p -Igio -I../gio -Iglib -I../glib -fcolor-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -O2 -g -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -Wimplicit-fallthrough -Wmisleading-indentation -Wunused -Wno-unused-parameter -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Wno-variadic-macros -Werror=format=2 -Werror=init-self -Werror=missing-include-dirs -Werror=pointer-arith -Werror=unused-result -Wstrict-prototypes -Wno-bad-function-cast -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=pointer-sign '-DG_LOG_DOMAIN="GLib-GIO"' -DGIO_COMPILATION '-DGIO_LAUNCH_DESKTOP="/opt/gnome/libexec/gio-launch-desktop"' '-DGIO_MODULE_DIR="/opt/gnome/lib/gio/modules"' '-DLOCALSTATEDIR="/opt/gnome/var"' -fvisibility=hidden -MD -MQ gio/gio-launch-desktop.p/gio-launch-desktop.c.o -MF gio/gio-launch-desktop.p/gio-launch-desktop.c.o.d -o gio/gio-launch-desktop.p/gio-launch-desktop.c.o -c ../gio/gio-launch-desktop.c
../gio/gio-launch-desktop.c:124:20: error: static_assert expression is not an integral constant expression
G_STATIC_ASSERT (LOG_EMERG == 0 && "Linux ABI defines LOG_EMERG");
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/syslog.h:51:19: note: expanded from macro 'LOG_EMERG'
#define LOG_EMERG 0 /* system is unusable */
^
../glib/gmacros.h:824:47: note: expanded from macro 'G_STATIC_ASSERT'
#define G_STATIC_ASSERT(expr) _Static_assert (expr, "Expression evaluates to false")
^~~~
../gio/gio-launch-desktop.c:125:20: error: static_assert expression is not an integral constant expression
G_STATIC_ASSERT (LOG_DEBUG == 7 && "Linux ABI defines LOG_DEBUG");
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/syslog.h:58:19: note: expanded from macro 'LOG_DEBUG'
#define LOG_DEBUG 7 /* debug-level messages */
^
../glib/gmacros.h:824:47: note: expanded from macro 'G_STATIC_ASSERT'
#define G_STATIC_ASSERT(expr) _Static_assert (expr, "Expression evaluates to false")
^~~~
2 errors generated.
[501/1350] Compiling C++ object gmodule/tests/cxx.p/cxx.cpp.o
ninja: build stopped: subcommand failed.
Compiled with clang 14.0.0 in Ubuntu 22.04.
No such problem with gcc 11.2.0.