public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug guile/28994] [build] Werror=deprecated-declarations for scm_install_gmp_memory_functions Date: Wed, 06 Jul 2022 15:16:29 +0000 [thread overview] Message-ID: <bug-28994-4717-7aDbJ3KaJa@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-28994-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=28994 --- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Ludovic Courtès from comment #6) > (In reply to Tom de Vries from comment #5) > > Once more noted at > > https://sourceware.org/pipermail/gdb-patches/2022-July/190524.html . > > As suggested earlier, how about something along these lines: > > /* This variable is deprecated in Guile 3.0.8 and later but remains > available in the whole 3.0 series. */ > #pragma GCC diagnostic push > #pragma GCC diagnostic ignored "-Wdeprecated-declarations" > scm_install_gmp_memory_functions = 0; > #pragma GCC diagnostic pop > > If that's fine with you, I'd prefer to let you check this in as I'm lacking > the bandwidth to do more currently. Works for me. I've also added a test on SCM_MAJOR/MINOR_VERSION to make sure we don't run into trouble once the variable is removed: ... diff --git a/gdb/guile/guile.c b/gdb/guile/guile.c index 14b191ded62..e5565b627d9 100644 --- a/gdb/guile/guile.c +++ b/gdb/guile/guile.c @@ -677,7 +677,17 @@ gdbscm_initialize (const struct extension_language_defn *ext lang) "double free or corruption (out)" error. Work around the libguile bug by disabling the installation of the libgmp memory functions by guile initialization. */ + + /* The scm_install_gmp_memory_functions variable should be removed after + version 3.0, so limit usage to 3.0 and before. */ +#if SCM_MAJOR_VERSION < 3 || (SCM_MAJOR_VERSION == 3 && SCM_MINOR_VERSION == 0 ) + /* This variable is deprecated in Guile 3.0.8 and later but remains + available in the whole 3.0 series. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" scm_install_gmp_memory_functions = 0; +#pragma GCC diagnostic pop +#endif- /* scm_with_guile is the most portable way to initialize Guile. Plus we need to initialize the Guile support while in Guile mode (e.g., ... WDYT? -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-07-06 15:16 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-23 14:12 [Bug build/28994] New: " vries at gcc dot gnu.org 2022-04-15 13:39 ` [Bug guile/28994] " tromey at sourceware dot org 2022-05-07 14:58 ` tromey at sourceware dot org 2022-05-08 6:37 ` vries at gcc dot gnu.org 2022-05-09 8:35 ` ludo at gnu dot org 2022-05-12 22:27 ` tromey at sourceware dot org 2022-07-06 8:02 ` vries at gcc dot gnu.org 2022-07-06 14:04 ` ludo at gnu dot org 2022-07-06 15:16 ` vries at gcc dot gnu.org [this message] 2022-07-07 7:59 ` vries at gcc dot gnu.org 2022-07-07 13:52 ` ludo at gnu dot org 2022-07-08 14:02 ` vries at gcc dot gnu.org
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 * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-28994-4717-7aDbJ3KaJa@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).