From a4718e6747243af4ce6de66e7c037d7d9c7814fc Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 28 Nov 2023 22:44:30 +0100 Subject: [PATCH] github: build with "-fexceptions" CFLAGS This seems good for our test builds. This can result in additional uninitialized variable warnings about autovariables with cleanup attribute. This flag is also enabled by default on Fedora package build ([1]). [1] https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/buildflags.md --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 930316ea..c6b6789a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,7 +70,7 @@ jobs: set -x export CC="${{ matrix.cc }}" - export CFLAGS="-DNL_MORE_ASSERTS=1000 -O2 -Werror -Wall -Wdeclaration-after-statement -Wvla -std=gnu11" + export CFLAGS="-DNL_MORE_ASSERTS=1000 -O2 -Werror -Wall -Wdeclaration-after-statement -Wvla -std=gnu11 -fexceptions" if [ "$CC" = "clang" ]; then CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument -Wno-error=unused-function" export LDFLAGS="-Wl,--no-undefined-version,--fatal-warnings" @@ -128,7 +128,7 @@ jobs: set -x git clean -fdx export CC="${{ matrix.cc }}" - export CFLAGS="-Werror -Wall -Wdeclaration-after-statement -Wvla -std=gnu11" + export CFLAGS="-Werror -Wall -Wdeclaration-after-statement -Wvla -std=gnu11 -fexceptions" if [ "$CC" = "clang" ]; then CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument -Wno-error=unused-function" fi @@ -188,7 +188,7 @@ jobs: set -x export CC="${{ matrix.cc }}" - export CFLAGS="-DNL_MORE_ASSERTS=1000 -O2 -Werror -Wall -Wdeclaration-after-statement -Wvla -std=gnu11" + export CFLAGS="-DNL_MORE_ASSERTS=1000 -O2 -Werror -Wall -Wdeclaration-after-statement -Wvla -std=gnu11 -fexceptions" if [ "$CC" = "clang" ]; then CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument -Wno-error=unused-function" export LDFLAGS="-Wl,--no-undefined-version,--fatal-warnings"