Change CMAKE_C_STANDARD from 99 to 11
Set C11 as the default so that we can use static_assert().
The public headers should remain C99.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b795715..55e3bf6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,10 @@
## [Unreleased]
+### Changed since 1.4.1
+
+* Require C11 for compilation. Public headers will remain C99.
+
## [1.4.1] - 2026-03-20
### Changed since 1.4.0
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c83ff6..e82b969 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,13 +47,13 @@
option(AVIF_ENABLE_NODISCARD "Add [[nodiscard]] to some functions." OFF)
-# Set C99 as the default
+# Set C11 as the default
if(AVIF_ENABLE_NODISCARD)
# [[nodiscard]] requires C23.
set(CMAKE_C_STANDARD 23)
set(CMAKE_C_STANDARD_REQUIRED ON)
else()
- set(CMAKE_C_STANDARD 99)
+ set(CMAKE_C_STANDARD 11)
endif()
# SOVERSION scheme: MAJOR.MINOR.PATCH