diff --git a/doc/developer/advance.tex b/doc/developer/advance.tex
index eccc95f2e5295f0c9455b92cbf04d1c0c2b232be..13357f76e11e74b919a909d9d7c617ccaf669c6e 100644
--- a/doc/developer/advance.tex
+++ b/doc/developer/advance.tex
@@ -3240,11 +3240,20 @@ is to use standard output).
 \item \texttt{--help}: outputs the list of all options of the script.
 \end{description}
 
+Note that for some compiler setups, notably for non-POSIX compilation targets,
+the script may fail to find an appropriate value for some fields and will
+instead put some default value. In that case, warnings will give the names of
+the problematic fields. Since the issue likely stems from the fact that the
+corresponding C feature is not supported on the compilation target in the first
+place, in practice, such feature is not expected to be found in code written for
+such target. However, users are invited to review the generated YAML and
+provide more appropriate values for these fields if needed.
+
 In order to communicate machine-related information to the preprocessor (notably
 the value of standard macros), \framac generates a specific header,
 \verb+__fc_machdep.h+, that is automatically included by the standard headers from
 \framac's standard C library. Field \verb+custom_defs+ of the YAML file allows
-customizing this header (see next section for more information)
+customizing this header (see next section for more information).
 
 \subsection{Machdep record fields}\label{sec:machdep-fields}
 
diff --git a/share/machdeps/make_machdep/make_machdep.py b/share/machdeps/make_machdep/make_machdep.py
index 6d15918e72b52f40d2dd59bef9c38a079c1c9d56..c7a8cabe9fc1d3c083f26b580b89aa23fabf3d8e 100755
--- a/share/machdeps/make_machdep/make_machdep.py
+++ b/share/machdeps/make_machdep/make_machdep.py
@@ -169,8 +169,8 @@ def default_value(typ):
 
 def make_machdep():
     machdep = {}
-    for key, value in schema.items():
-        machdep[key] = default_value(value["type"])
+    for key in schema:
+        machdep[key] = None
     return machdep
 
 
@@ -269,8 +269,7 @@ def find_value(name, typ, output):
             machdep[name] = value
         else:
             logging.warning(
-                f"cannot find value of field '{name}', using default value: '{default}'",
-                stacklevel=-1,
+                f"cannot find value of field '{name}', using default value: '{default}'"
             )
             machdep[name] = default
             if args.verbose:
@@ -419,7 +418,9 @@ else:
 missing_fields = [f for [f, v] in machdep.items() if v is None]
 
 if missing_fields:
-    print("WARNING: the following fields are missing from the machdep definition:")
-    print(", ".join(missing_fields))
+    msg = ", ".join(missing_fields)
+    logging.warning(f"the following fields are missing from the machdep definition: {msg}")
+    for field in missing_fields:
+        machdep[field] = default_value(schema[field]["type"])
 
 print_machdep(machdep)
diff --git a/share/machdeps/make_machdep/nsig.c b/share/machdeps/make_machdep/nsig.c
index 5fa6451f020dc696755688ae93edadd105f453ab..e82b4fbe2eba34b9f74dfd6dcb0c7da9ccd53ea4 100644
--- a/share/machdeps/make_machdep/nsig.c
+++ b/share/machdeps/make_machdep/nsig.c
@@ -24,6 +24,6 @@
 
 #if defined(NSIG)
 int nsig_is = NSIG;
-#elif defined(_NSIG);
+#elif defined(_NSIG)
 int nsig_is = _NSIG;
 #endif
diff --git a/share/machdeps/make_machdep/posix_version.c b/share/machdeps/make_machdep/posix_version.c
index 73d92daf747f49d5b5ecff9d813c6d2a549e45e6..bdd131ffc0dace0035d2dcf3b2e6a71b2b1532fd 100644
--- a/share/machdeps/make_machdep/posix_version.c
+++ b/share/machdeps/make_machdep/posix_version.c
@@ -24,6 +24,4 @@
 
 #if defined(_POSIX_VERSION)
 long posix_version_is = _POSIX_VERSION;
-#else
-#error "not a posix arch"
 #endif