From: Paul Eggert <eggert@cs.ucla.edu>
To: Jacob Faibussowitsch <jacob.fai@gmail.com>
Cc: "Gerd Möllmann" <gerd.moellmann@gmail.com>, 58966@debbugs.gnu.org
Subject: bug#58966: [Trunk] Xcode 14.1+ (and macOS 13.0+) deprecate sprintf()
Date: Thu, 3 Nov 2022 11:30:50 -0700 [thread overview]
Message-ID: <91d5853d-b810-3b69-93cf-772c81c34f7e@cs.ucla.edu> (raw)
In-Reply-To: <FAD4DF71-A76D-4933-8AF4-6AF389423D54@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 362 bytes --]
It appears that Apple has gone on the warpath against sprintf even if
you compile with plain 'gcc' with no options, which means
--disable-gcc-warnings does not suppress the false alarms.
I installed the attached further patch to attempt to pacify Apple's
compiler; please give it a try.
Perhaps Apple's compiler will start complaining about strcpy next....
[-- Attachment #2: 0001-Improve-suppression-of-bogus-macOS-warnings.patch --]
[-- Type: text/x-patch, Size: 1427 bytes --]
From 39f5696921c1618f46358a5c189244d3993a1fca Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 3 Nov 2022 11:09:53 -0700
Subject: [PATCH] Improve suppression of bogus macOS warnings
* configure.ac: On macOS, always use -Wno-deprecated-declarations,
as the false alarms appear even if --disable-gcc-warnings is given
(Bug#58966).
---
configure.ac | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index c9d1eb5709..b656dba4d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1144,12 +1144,6 @@ AC_DEFUN
gl_WARN_ADD([-Wno-int-in-bool-context])
fi
- # Suppress deprecation warnings from using sprintf variants,
- # starting with Xcode 14.1 on macOS 13.
- if test $opsys = darwin; then
- gl_WARN_ADD([-Wno-deprecated-declarations])
- fi
-
# This causes too much noise in the MinGW build
if test $opsys = mingw32; then
gl_WARN_ADD([-Wno-pointer-sign])
@@ -1176,6 +1170,13 @@ AC_DEFUN
gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare])
fi
+# Suppress deprecation warnings from using sprintf variants,
+# starting with Xcode 14.1 on macOS 13.
+# These warnings are false alarms, as Emacs usage of sprintf is safe.
+if test $opsys = darwin; then
+ gl_WARN_ADD([-Wno-deprecated-declarations])
+fi
+
# Use a slightly smaller set of warning options for lib/.
nw=
nw="$nw -Wunused-macros"
--
2.37.2
next prev parent reply other threads:[~2022-11-03 18:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 13:56 bug#58966: [Trunk] Xcode 14.1+ (and macOS 13.0+) deprecate sprintf() Jacob Faibussowitsch
2022-11-03 5:56 ` Gerd Möllmann
2022-11-03 8:16 ` Eli Zaretskii
2022-11-03 9:00 ` Gerd Möllmann
2022-11-03 9:15 ` Eli Zaretskii
2022-11-03 9:36 ` Gerd Möllmann
2022-11-03 14:40 ` Jacob Faibussowitsch
2022-11-03 14:43 ` Gerd Möllmann
2022-11-03 14:48 ` Jacob Faibussowitsch
2022-11-03 15:22 ` Gerd Möllmann
2022-11-03 15:30 ` Jacob Faibussowitsch
2022-11-03 16:15 ` Gerd Möllmann
2022-11-03 16:19 ` Gerd Möllmann
2022-11-03 18:30 ` Paul Eggert [this message]
2022-11-04 21:07 ` Jacob Faibussowitsch
2022-11-05 3:12 ` Richard Stallman
2022-11-05 16:26 ` Stefan Kangas
2022-11-05 20:00 ` Paul Eggert
2022-11-07 7:46 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91d5853d-b810-3b69-93cf-772c81c34f7e@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=58966@debbugs.gnu.org \
--cc=gerd.moellmann@gmail.com \
--cc=jacob.fai@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).