Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH] Remove #ifdef from cooked-index-entry.c
Date: Wed, 28 Oct 2026 11:23:01 -0600	[thread overview]
Message-ID: <20261028172301.1376846-1-tromey@adacore.com> (raw)

cooked-index-entry.c has an #ifdef to work around a GCC 7.5.0 bug.
However, the workaround just removes a 'constexpr' which is not
needed.  The constexpr behavior was desirable in the past, but this
changed with commit 8cbf7d2a ("gdb/dwarf: remove unnecessary
comparison in cooked_index_entry::compare").

This removes the #ifdef and the constexpr.
---
 gdb/dwarf2/cooked-index-entry.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/gdb/dwarf2/cooked-index-entry.c b/gdb/dwarf2/cooked-index-entry.c
index 44b065157b8..c76c263117a 100644
--- a/gdb/dwarf2/cooked-index-entry.c
+++ b/gdb/dwarf2/cooked-index-entry.c
@@ -47,12 +47,7 @@ int
 cooked_index_entry::compare (const char *stra, const char *strb,
 			     comparison_mode mode)
 {
-#if defined (__GNUC__) && !defined (__clang__) && __GNUC__ <= 7
-  /* Work around error with gcc 7.5.0.  */
   auto munge = [] (char c) -> unsigned char
-#else
-  auto munge = [] (char c) constexpr -> unsigned char
-#endif
     {
       /* Treat '<' as if it ended the string.  This lets something
 	 like "func<t>" match "func<t<int>>".  See the "Breakpoints in

base-commit: aeed64b39aed57729f66ad51560d8964e8201e6e
-- 
2.56.0


             reply	other threads:[~2026-10-28 17:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 17:23 Tom Tromey [this message]
2026-10-28 17:33 ` Simon Marchi
2026-10-28 21:23   ` Tom Tromey

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=20261028172301.1376846-1-tromey@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@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: link
Be 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