From e2d706cbd0be4ede7fd98c020cd773bded2b5269 Mon Sep 17 00:00:00 2001 From: tkbits <96506466+2kbits@users.noreply.github.com> Date: Wed, 25 Feb 2026 02:01:30 -0800 Subject: [PATCH] Tell cmake to use c99 to fix build with GCC 15 GCC 15 uses c23 instead of c17 by default. Apparently c23 is not backwards compatible to older C standards... This prevented me from easily compuling simh so I added a setting to tell cmake to use c99 fixing the compiling errors. Fixes #490 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 120da396..e644e3ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,6 +82,9 @@ endif() project(simh VERSION "${SIMH_VERSION}" LANGUAGES C CXX) +## Tell cmake we need c99 because GCC 15 defaults to c23 which breaks things. +set(CMAKE_C_STANDARD 99) + include(vcpkg-setup) include(GNUInstallDirs)