--- src/preproc/pic/pic.cpp	2023-07-06 04:59:26.000000000 +0800
+++ src/preproc/pic/pic.cpp	2023-12-23 07:17:16.000000000 +0800
@@ -5057,11 +5057,8 @@
 	one_format += '\0';
 // We validated the format string above.  Most conversion specifiers are
 // rejected, including `n`.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
 	snprintf(sprintf_buf, sizeof(sprintf_buf),
 		 one_format.contents(), v[i++]);
-#pragma GCC diagnostic pop
       }
       one_format.clear();
       result += sprintf_buf;

--- src/preproc/pic/pic.ypp	2023-07-03 00:09:34.000000000 +0800
+++ src/preproc/pic/pic.ypp	2023-12-23 07:17:08.000000000 +0800
@@ -1934,11 +1934,8 @@
 	one_format += '\0';
 // We validated the format string above.  Most conversion specifiers are
 // rejected, including `n`.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
 	snprintf(sprintf_buf, sizeof(sprintf_buf),
 		 one_format.contents(), v[i++]);
-#pragma GCC diagnostic pop
       }
       one_format.clear();
       result += sprintf_buf;

--- src/preproc/eqn/delim.cpp	2023-07-03 00:09:34.000000000 +0800
+++ src/preproc/eqn/delim.cpp	2023-12-23 07:17:23.000000000 +0800
@@ -319,10 +319,7 @@
   char buf[256];
 // The format string in the sprintf below comes from a struct
 // initializer above, and is not subject to external influence.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
   sprintf(buf, d->chain_format, "\\\\n[" INDEX_REG "]");
-#pragma GCC diagnostic pop
   printf(".nr " INDEX_REG " 0\n"
 	 ".de " TEMP_MACRO "\n"
 	 ".ie c%s \\{\\\n"
