From: simon.marchi@polymtl.ca
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [pushed] gdbsupport: remove iteration_status_str
Date: Fri, 17 Apr 2026 22:58:10 -0400 [thread overview]
Message-ID: <20260418025812.3494183-1-simon.marchi@polymtl.ca> (raw)
From: Simon Marchi <simon.marchi@polymtl.ca>
When building with g++ 8 (on Alma Linux 8), we get:
CXX ada-exp.o
In file included from /binutils-gdb/gdb/../gdbsupport/array-view.h:24,
from /binutils-gdb/gdb/../gdbsupport/common-utils.h:27,
from /binutils-gdb/gdb/../gdbsupport/common-defs.h:214,
from /binutils-gdb/gdb/defs.h:26,
from <command-line>:
/binutils-gdb/gdb/../gdbsupport/iteration-status.h: In function ‘constexpr const char* iteration_status_str(iteration_status)’:
/binutils-gdb/gdb/../gdbsupport/gdb_assert.h:43:22: error: call to non-‘constexpr’ function ‘void internal_error_loc(const char*, int, const char*, ...)’
internal_error_loc (__FILE__, __LINE__, _("%s: " message), __func__, \
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##__VA_ARGS__)
~~~~~~~~~~~~~~
/binutils-gdb/gdb/../gdbsupport/iteration-status.h:45:3: note: in expansion of macro ‘gdb_assert_not_reached’
gdb_assert_not_reached ("invalid iteration_status value");
^~~~~~~~~~~~~~~~~~~~~~
It turns out that iteration_status_str isn't used, it apparently was
only used transiently in my series. Remove it to fix the build failure.
Change-Id: Icb43d4d719ad94a3eafa5fd55c81a56cbe0da91d
---
gdbsupport/iteration-status.h | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/gdbsupport/iteration-status.h b/gdbsupport/iteration-status.h
index c4c17fea4fb5..9d0b56e1b2b5 100644
--- a/gdbsupport/iteration-status.h
+++ b/gdbsupport/iteration-status.h
@@ -30,19 +30,4 @@ enum class iteration_status
stop,
};
-constexpr const char *
-iteration_status_str (iteration_status status)
-{
- switch (status)
- {
- case iteration_status::keep_going:
- return "keep_going";
-
- case iteration_status::stop:
- return "stop";
- }
-
- gdb_assert_not_reached ("invalid iteration_status value");
-}
-
#endif /* GDBSUPPORT_ITERATION_STATUS_H */
base-commit: 89ab6f98afc35581b9fe32d9a59225d4aab19518
--
2.53.0
reply other threads:[~2026-04-18 2:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260418025812.3494183-1-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--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