[binutils-gdb] gdbsupport: remove iteration_status_str

Simon Marchi via Gdb-cvs <[email protected]>
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f2e83582f4f1c6374afdd919fed59d713a225c0e

commit f2e83582f4f1c6374afdd919fed59d713a225c0e
Author: Simon Marchi <[email protected]>
Date:   Fri Apr 17 22:41:52 2026 -0400

    gdbsupport: remove iteration_status_str
    
    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

Diff:
---
 gdbsupport/iteration-status.h | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/gdbsupport/iteration-status.h b/gdbsupport/iteration-status.h
index c4c17fea4fb..9d0b56e1b2b 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 */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.