diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c9ad67eac379d0691f35c206bd4184d404ca7b58..c31f4843d466b65c5478a5f1814b8696257f5ea9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -59,7 +59,7 @@ build_macos_x86_64:
     - macOS
   script:
     - autoreconf -si
-    - arch -x86_64 ./configure CC=gcc-12 CXX=g++-12 LEX=/usr/local/opt/flex/bin/flex YACC=/usr/local/opt/bison/bin/bison
+    - arch -x86_64 ./configure CC=gcc-13 CXX=g++-13 LEX=/usr/local/opt/flex/bin/flex YACC=/usr/local/opt/bison/bin/bison
     - arch -x86_64 make -j$(sysctl -n hw.ncpu)
   artifacts:
     paths:
diff --git a/src/ModelTree.cc b/src/ModelTree.cc
index 72320d522683b6e1a8ad74b28aedd0ee942ef759..36e9ad2a75068f622ad39dd5ce5cd1cf1877cd78 100644
--- a/src/ModelTree.cc
+++ b/src/ModelTree.cc
@@ -1616,8 +1616,7 @@ ModelTree::matlab_arch(const string &mexext)
 filesystem::path
 ModelTree::findGccOnMacos(const string &mexext)
 {
-  const string macos_gcc_version {"12"}; // doc/manual/source/installation-and-configuration.rst
-                                         // should be updated when this is changed
+  const string macos_gcc_version {"13"};
   char dynare_preprocessor_path[PATH_MAX];
   uint32_t size = PATH_MAX;
   filesystem::path local_gcc_path;