diff --git a/src/ModelTree.cc b/src/ModelTree.cc
index d7fe7e97f972b2fca7b16f955bfe44bbd22dc1f1..6169fb70602c9b52a9d38e9e78d9e82c1af223fb 100644
--- a/src/ModelTree.cc
+++ b/src/ModelTree.cc
@@ -2036,16 +2036,16 @@ ModelTree::compileMEX(const string &basename, const string &funcname, const stri
           if (_NSGetExecutablePath(dynare_m_path, &size) == 0)
             {
               string str = dynare_m_path;
-              gcc_relative_path = str.substr(0, str.find_last_of("/")) + "/../../.brew/bin/gcc-9";
+              gcc_relative_path = str.substr(0, str.find_last_of("/")) + "/../../.brew/bin/gcc-10";
             }
 
           if (filesystem::exists(gcc_relative_path))
             compiler = gcc_relative_path;
-          else if (filesystem::exists("/usr/local/bin/gcc-9"))
-            compiler = "/usr/local/bin/gcc-9";
+          else if (filesystem::exists("/usr/local/bin/gcc-10"))
+            compiler = "/usr/local/bin/gcc-10";
           else
             {
-              cerr << "ERROR: You must install gcc-9 on your system before using the `use_dll` option of Dynare. "
+              cerr << "ERROR: You must install gcc-10 on your system before using the `use_dll` option of Dynare. "
                    << "You can do this via the Dynare installation package." << endl;
               exit(EXIT_FAILURE);
             }