Disable -Wregister for amazonlinux:2 in CI

amazonlinux:2 has a really old GNU bison version (3.0.4), which emits
`register` storage specifiers in its generated C code, which any standard
starting with C99 doesn't allow anymore.
This commit is contained in:
Johannes Schmidt 2026-02-26 11:45:06 +01:00
parent ae86358ca3
commit ed18ad5101

View file

@ -13,6 +13,12 @@ SCL_ENABLE_GCC=()
WARN_FLAGS="-Wall -Wextra -Wno-template-id-cdtor -Wno-stringop-overflow"
case "$DISTRO" in
amazonlinux:2)
# amazonlinux:2 has a really old GNU bison (3.0.4), which still emits register storage
# specifiers, that even the only slightly more modern compiler warns that C++17 does not
# allow (duh).
WARN_FLAGS="${WARN_FLAGS} -Wno-register"
;;
debian:11)
# -Wattributes neededs to be disabled to not get warnings in old compilers about not-yet
# understood attributes, like [[gnu::no_dangling]] on debian:11.