[00/11] GDB: Require C++17

Message ID 20231013144418.3180617-1-lancelot.six@amd.com
Headers
Series GDB: Require C++17 |

Message

Lancelot SIX Oct. 13, 2023, 2:44 p.m. UTC
  Hi all,

This series is a followup of the discussions from last Cauldron and Tom's
RFC patch[1] regarding requiring C++17 in GDB.  It seems that the
overall sentiment is positive for such move, so here is a proper series.

The first patch in the series is a preparatory step to improve
configure's C++ dialect detection, importing recent changes from
upstream autoconf to our locally maintained ax_cxx_compile_stdcxx.m4.

Patch #2 is almost identical to what Tom sent[1], except that the
regenerated configure scripts profit from patch #1.

Patch #3 to #9 removes some locally maintained equivalent of features
now available in C++17 standard library (std::make_unique,
std::optional, std::string_view, stt::invoke_result).

Finally, some places in GDB used to use some custom implementations
depending on the current compiler's C++ version.  Patch #10 and #11
remove the pre-C++17 branches (and the need for conditional
compilation).

Given that the patches can be big, I am not sure they will all make it
through the mailing list.  I have also pushed them under the
`users/lsix/try-require-c++17` branch (there might be minor differences
between the patch and the branch as I fix typos in the commit messages).

I have tested this series on x86_64 GNU/Linux (Ubuntu-22.04) and have
seen no regression.  The try-bots did not report any issue either.

I expect no user visible change after this series.

As usual, all feedbacks are welcome.

All the best,
Lancelot.

[1] https://sourceware.org/pipermail/gdb-patches/2023-October/202987.html

Lancelot Six (11):
  gdb/ax_cxx_compile_stdcxx.m4: upgrade
  gdb/gdbsupport/gdbserver: Require c++17
  gdb: Use C++17's std::make_unique instead of gdb::make_unique
  gdb: Replace gdb::optional with std::optional
  gdbsupport: remove gdb::optional
  gdb: Use std::string_view instead of gdb::string_view
  gdb: Remove uses of gdb::to_string (const std::string_view &)
  gdbsupport: Remove gdb::string_view
  gdbsupport: Replace gdb::invoke_result with std::invoke_result
  gdb/disasm.h: Mark callbacks noexcept unconditionally
  gdb: Use initializers in lambda captures unconditionally

 gdb/Makefile.in                               |    2 -
 gdb/NEWS                                      |    3 +
 gdb/aarch64-linux-tdep.c                      |   10 +-
 gdb/ada-lang.c                                |   34 +-
 gdb/ada-lex.l                                 |    2 +-
 gdb/ada-valprint.c                            |    4 +-
 gdb/addrmap.c                                 |    3 +-
 gdb/amd-dbgapi-target.c                       |    4 +-
 gdb/amdgpu-tdep.c                             |   68 +-
 gdb/annotate.c                                |    2 +-
 gdb/arm-fbsd-tdep.c                           |    6 +-
 gdb/arm-fbsd-tdep.h                           |    2 +-
 gdb/arm-linux-tdep.c                          |    2 +-
 gdb/arm-tdep.c                                |    4 +-
 gdb/auto-load.c                               |    2 +-
 gdb/auxv.c                                    |   10 +-
 gdb/auxv.h                                    |    4 +-
 gdb/avr-tdep.c                                |    2 +-
 gdb/ax_cxx_compile_stdcxx.m4                  |  126 +-
 gdb/break-catch-load.c                        |    3 +-
 gdb/breakpoint.c                              |   19 +-
 gdb/buildsym.c                                |    2 +-
 gdb/cli/cli-cmds.c                            |    6 +-
 gdb/cli/cli-cmds.h                            |    4 +-
 gdb/cli/cli-decode.c                          |    4 +-
 gdb/cli/cli-decode.h                          |    2 +-
 gdb/cli/cli-option.c                          |   14 +-
 gdb/cli/cli-option.h                          |    2 +-
 gdb/cli/cli-script.c                          |    4 +-
 gdb/command.h                                 |    2 +-
 gdb/compile/compile-c-support.c               |    3 +-
 gdb/compile/compile.c                         |    4 +-
 gdb/config.in                                 |    4 +-
 gdb/configure                                 | 1994 +++++++++++++++--
 gdb/configure.ac                              |    4 +-
 gdb/cp-name-parser.y                          |    3 +-
 gdb/cp-support.c                              |   11 +-
 gdb/darwin-nat.c                              |    2 +-
 gdb/dbxread.c                                 |   18 +-
 gdb/debuginfod-support.c                      |   19 +-
 gdb/disasm.c                                  |   14 +-
 gdb/disasm.h                                  |   29 +-
 gdb/dwarf2/attribute.h                        |    2 +-
 gdb/dwarf2/cooked-index.c                     |   13 +-
 gdb/dwarf2/cooked-index.h                     |    2 +-
 gdb/dwarf2/cu.h                               |    8 +-
 gdb/dwarf2/die.h                              |    4 +-
 gdb/dwarf2/frame.c                            |    3 +-
 gdb/dwarf2/index-cache.h                      |    2 +-
 gdb/dwarf2/index-common.c                     |    2 +-
 gdb/dwarf2/index-common.h                     |    2 +-
 gdb/dwarf2/index-write.c                      |    4 +-
 gdb/dwarf2/line-header.c                      |    4 +-
 gdb/dwarf2/macro.c                            |    4 +-
 gdb/dwarf2/macro.h                            |    2 +-
 gdb/dwarf2/read-debug-names.c                 |    3 +-
 gdb/dwarf2/read-gdb-index.c                   |    7 +-
 gdb/dwarf2/read.c                             |   31 +-
 gdb/dwarf2/read.h                             |    2 +-
 gdb/elfread.c                                 |    8 +-
 gdb/eval.c                                    |    2 +-
 gdb/event-top.c                               |    2 +-
 gdb/exceptions.c                              |    4 +-
 gdb/extension-priv.h                          |    6 +-
 gdb/extension.c                               |   12 +-
 gdb/extension.h                               |    8 +-
 gdb/f-lang.c                                  |    2 +-
 gdb/fbsd-nat.c                                |    6 +-
 gdb/fbsd-nat.h                                |    4 +-
 gdb/fbsd-tdep.c                               |    8 +-
 gdb/gdb_bfd.c                                 |    2 +-
 gdb/gdbthread.h                               |    8 +-
 gdb/gdbtypes.c                                |   21 +-
 gdb/gdbtypes.h                                |    8 +-
 gdb/guile/scm-ports.c                         |    4 +-
 gdb/ia64-tdep.c                               |    4 +-
 gdb/inf-child.c                               |    2 +-
 gdb/inf-child.h                               |    2 +-
 gdb/infcmd.c                                  |    4 +-
 gdb/inferior.c                                |    4 +-
 gdb/inferior.h                                |    2 +-
 gdb/inflow.c                                  |    4 +-
 gdb/infrun.c                                  |   12 +-
 gdb/interps.c                                 |    2 +-
 gdb/interps.h                                 |    4 +-
 gdb/jit.c                                     |    2 +-
 gdb/language.c                                |    2 +-
 gdb/linux-nat.c                               |    4 +-
 gdb/linux-nat.h                               |    2 +-
 gdb/linux-tdep.c                              |   26 +-
 gdb/linux-tdep.h                              |    4 +-
 gdb/linux-thread-db.c                         |    2 +-
 gdb/main.c                                    |    4 +-
 gdb/mdebugread.c                              |   18 +-
 gdb/mi/mi-cmd-stack.c                         |    4 +-
 gdb/mi/mi-cmd-var.c                           |    2 +-
 gdb/mi/mi-cmds.c                              |    2 +-
 gdb/mi/mi-cmds.h                              |    8 +-
 gdb/mi/mi-interp.c                            |    2 +-
 gdb/mi/mi-interp.h                            |    2 +-
 gdb/mi/mi-main.c                              |   15 +-
 gdb/mi/mi-out.c                               |    7 +-
 gdb/minsyms.c                                 |    4 +-
 gdb/minsyms.h                                 |    2 +-
 gdb/nat/linux-btrace.c                        |    5 +-
 gdb/nat/linux-osdata.c                        |    8 +-
 gdb/nat/windows-nat.c                         |    6 +-
 gdb/nat/windows-nat.h                         |    4 +-
 gdb/observable.h                              |    2 +-
 gdb/osdata.c                                  |    2 +-
 gdb/parse.c                                   |    4 +-
 gdb/ppc-linux-nat.c                           |    4 +-
 gdb/ppc-linux-tdep.c                          |    2 +-
 gdb/ppc-tdep.h                                |    2 +-
 gdb/printcmd.c                                |    6 +-
 gdb/probe.c                                   |   22 +-
 gdb/procfs.c                                  |    2 +-
 gdb/psymtab.c                                 |    4 +-
 gdb/psymtab.h                                 |    6 +-
 gdb/python/py-disasm.c                        |   22 +-
 gdb/python/py-framefilter.c                   |   10 +-
 gdb/python/py-inferior.c                      |    2 +-
 gdb/python/py-mi.c                            |    5 +-
 gdb/python/py-utils.c                         |    4 +-
 gdb/python/py-varobj.c                        |    3 +-
 gdb/python/python-internal.h                  |    4 +-
 gdb/python/python.c                           |    8 +-
 gdb/ravenscar-thread.c                        |    4 +-
 gdb/record-btrace.c                           |    8 +-
 gdb/regcache.c                                |    4 +-
 gdb/remote.c                                  |   16 +-
 gdb/riscv-tdep.c                              |    2 +-
 gdb/s390-linux-tdep.c                         |    2 +-
 gdb/skip.c                                    |    4 +-
 gdb/solib-aix.c                               |   14 +-
 gdb/solib-dsbt.c                              |    2 +-
 gdb/solib-rocm.c                              |   28 +-
 gdb/solib-svr4.c                              |   16 +-
 gdb/solib-target.c                            |    2 +-
 gdb/source-cache.c                            |    2 +-
 gdb/split-name.c                              |    4 +-
 gdb/split-name.h                              |    4 +-
 gdb/stabsread.c                               |    2 +-
 gdb/stack.c                                   |   16 +-
 gdb/stack.h                                   |    2 +-
 gdb/symfile.c                                 |    2 +-
 gdb/symtab.c                                  |   38 +-
 gdb/symtab.h                                  |   38 +-
 gdb/target.c                                  |   16 +-
 gdb/target.h                                  |   10 +-
 gdb/thread.c                                  |   14 +-
 gdb/tracefile-tfile.c                         |    2 +-
 gdb/tracepoint.c                              |    2 +-
 gdb/tui/tui-disasm.c                          |    2 +-
 gdb/tui/tui-io.c                              |    2 +-
 gdb/tui/tui-layout.c                          |    2 +-
 gdb/tui/tui-win.c                             |    6 +-
 gdb/ui-out.c                                  |    4 +-
 gdb/unittests/basic_string_view/capacity/1.cc |  172 --
 .../basic_string_view/capacity/empty_neg.cc   |   28 -
 .../basic_string_view/cons/char/1.cc          |   67 -
 .../basic_string_view/cons/char/2.cc          |   46 -
 .../basic_string_view/cons/char/3.cc          |   39 -
 .../basic_string_view/cons/wchar_t/1.cc       |   68 -
 .../basic_string_view/cons/wchar_t/2.cc       |   45 -
 .../basic_string_view/cons/wchar_t/3.cc       |   38 -
 .../element_access/char/1.cc                  |   70 -
 .../element_access/char/2.cc                  |   30 -
 .../element_access/char/empty.cc              |   39 -
 .../element_access/char/front_back.cc         |   43 -
 .../element_access/wchar_t/1.cc               |   71 -
 .../element_access/wchar_t/2.cc               |   32 -
 .../element_access/wchar_t/empty.cc           |   38 -
 .../element_access/wchar_t/front_back.cc      |   42 -
 gdb/unittests/basic_string_view/include.cc    |   25 -
 .../basic_string_view/inserters/char/1.cc     |   65 -
 .../basic_string_view/inserters/char/2.cc     |   91 -
 .../basic_string_view/inserters/char/3.cc     |   54 -
 .../inserters/pod/10081-out.cc                |   75 -
 .../basic_string_view/inserters/wchar_t/1.cc  |   70 -
 .../basic_string_view/inserters/wchar_t/2.cc  |   91 -
 .../basic_string_view/inserters/wchar_t/3.cc  |   53 -
 .../basic_string_view/literals/types.cc       |   45 -
 .../basic_string_view/literals/values.cc      |   72 -
 .../modifiers/remove_prefix/char/1.cc         |   66 -
 .../modifiers/remove_prefix/wchar_t/1.cc      |   61 -
 .../modifiers/remove_suffix/char/1.cc         |   66 -
 .../modifiers/remove_suffix/wchar_t/1.cc      |   61 -
 .../modifiers/swap/char/1.cc                  |   36 -
 .../modifiers/swap/wchar_t/1.cc               |   35 -
 .../operations/compare/char/1.cc              |  132 --
 .../operations/compare/char/13650.cc          |   50 -
 .../operations/compare/char/2.cc              |   30 -
 .../operations/compare/char/70483.cc          |   89 -
 .../operations/compare/wchar_t/1.cc           |  133 --
 .../operations/compare/wchar_t/13650.cc       |   49 -
 .../operations/compare/wchar_t/2.cc           |   30 -
 .../operations/copy/char/1.cc                 |   46 -
 .../operations/copy/wchar_t/1.cc              |   46 -
 .../operations/data/char/1.cc                 |   44 -
 .../operations/data/wchar_t/1.cc              |   43 -
 .../operations/find/char/1.cc                 |  168 --
 .../operations/find/char/2.cc                 |  166 --
 .../operations/find/char/3.cc                 |  166 --
 .../operations/find/char/4.cc                 |   45 -
 .../operations/find/wchar_t/1.cc              |  163 --
 .../operations/find/wchar_t/2.cc              |  161 --
 .../operations/find/wchar_t/3.cc              |  161 --
 .../operations/find/wchar_t/4.cc              |   44 -
 .../operations/rfind/char/1.cc                |   95 -
 .../operations/rfind/char/2.cc                |   53 -
 .../operations/rfind/char/3.cc                |   68 -
 .../operations/rfind/wchar_t/1.cc             |   94 -
 .../operations/rfind/wchar_t/2.cc             |   52 -
 .../operations/rfind/wchar_t/3.cc             |   66 -
 .../operations/string_conversion/1.cc         |   51 -
 .../operations/substr/char/1.cc               |   79 -
 .../operations/substr/wchar_t/1.cc            |   79 -
 .../basic_string_view/operators/char/2.cc     |  373 ---
 .../basic_string_view/operators/wchar_t/2.cc  |  367 ---
 .../basic_string_view/range_access/char/1.cc  |   47 -
 .../range_access/wchar_t/1.cc                 |   47 -
 .../requirements/explicit_instantiation/1.cc  |   26 -
 .../explicit_instantiation/char/1.cc          |   23 -
 .../explicit_instantiation/char16_t/1.cc      |   24 -
 .../explicit_instantiation/char32_t/1.cc      |   24 -
 .../explicit_instantiation/wchar_t/1.cc       |   23 -
 .../requirements/typedefs.cc                  |   47 -
 gdb/unittests/basic_string_view/typedefs.cc   |   36 -
 gdb/unittests/basic_string_view/types/1.cc    |   43 -
 gdb/unittests/optional-selftests.c            |   95 -
 gdb/unittests/optional/assignment/1.cc        |  196 --
 gdb/unittests/optional/assignment/2.cc        |  194 --
 gdb/unittests/optional/assignment/3.cc        |  157 --
 gdb/unittests/optional/assignment/4.cc        |  157 --
 gdb/unittests/optional/assignment/5.cc        |   81 -
 gdb/unittests/optional/assignment/6.cc        |   91 -
 gdb/unittests/optional/assignment/7.cc        |   30 -
 gdb/unittests/optional/cons/copy.cc           |  127 --
 gdb/unittests/optional/cons/default.cc        |   59 -
 gdb/unittests/optional/cons/move.cc           |  125 --
 gdb/unittests/optional/cons/value.cc          |  295 ---
 gdb/unittests/optional/in_place.cc            |   66 -
 gdb/unittests/optional/observers/1.cc         |   32 -
 gdb/unittests/optional/observers/2.cc         |   36 -
 gdb/unittests/parallel-for-selftests.c        |    5 +-
 gdb/unittests/string_view-selftests.c         |  193 --
 gdb/utils.c                                   |    6 +-
 gdb/valarith.c                                |    4 +-
 gdb/valops.c                                  |    6 +-
 gdb/value.c                                   |    2 +-
 gdb/value.h                                   |    4 +-
 gdb/varobj.c                                  |    3 +-
 gdb/windows-nat.c                             |   10 +-
 gdb/xcoffread.c                               |   18 +-
 gdb/xml-support.c                             |    4 +-
 gdb/xml-support.h                             |    6 +-
 gdb/xml-syscall.c                             |    2 +-
 gdb/xml-tdesc.c                               |   12 +-
 gdb/xml-tdesc.h                               |    4 +-
 gdbserver/config.in                           |    4 +-
 gdbserver/configure                           | 1980 ++++++++++++++--
 gdbserver/configure.ac                        |    4 +-
 gdbserver/linux-aarch64-low.cc                |    4 +-
 gdbserver/regcache.cc                         |    4 +-
 gdbserver/regcache.h                          |    2 +-
 gdbserver/win32-low.cc                        |    2 +-
 gdbsupport/Makefile.in                        |    2 +-
 gdbsupport/common-debug.h                     |    4 +-
 gdbsupport/common-utils.h                     |    8 +-
 gdbsupport/config.in                          |    4 +-
 gdbsupport/configure                          | 1980 ++++++++++++++--
 gdbsupport/configure.ac                       |    4 +-
 gdbsupport/event-loop.cc                      |    6 +-
 gdbsupport/filestuff.cc                       |    2 +-
 gdbsupport/filestuff.h                        |    2 +-
 gdbsupport/filtered-iterator.h                |    4 +-
 gdbsupport/format.h                           |    4 +-
 gdbsupport/forward-scope-exit.h               |    6 +-
 gdbsupport/function-view.h                    |    4 +-
 gdbsupport/gdb_optional.h                     |  233 --
 gdbsupport/gdb_string_view.h                  |  566 -----
 gdbsupport/gdb_string_view.tcc                |  219 --
 gdbsupport/gdb_unique_ptr.h                   |   13 -
 gdbsupport/invoke-result.h                    |   37 -
 gdbsupport/parallel-for.h                     |    9 +-
 gdbsupport/range-chain.h                      |    2 +-
 gdbsupport/safe-iterator.h                    |    4 +-
 gdbsupport/scoped_ignore_sigttou.h            |    2 +-
 gdbsupport/thread-pool.cc                     |    2 +-
 gdbsupport/thread-pool.h                      |    4 +-
 291 files changed, 5968 insertions(+), 9706 deletions(-)
 delete mode 100644 gdb/unittests/basic_string_view/capacity/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/capacity/empty_neg.cc
 delete mode 100644 gdb/unittests/basic_string_view/cons/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/cons/char/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/cons/char/3.cc
 delete mode 100644 gdb/unittests/basic_string_view/cons/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/cons/wchar_t/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/cons/wchar_t/3.cc
 delete mode 100644 gdb/unittests/basic_string_view/element_access/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/element_access/char/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/element_access/char/empty.cc
 delete mode 100644 gdb/unittests/basic_string_view/element_access/char/front_back.cc
 delete mode 100644 gdb/unittests/basic_string_view/element_access/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/element_access/wchar_t/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/element_access/wchar_t/empty.cc
 delete mode 100644 gdb/unittests/basic_string_view/element_access/wchar_t/front_back.cc
 delete mode 100644 gdb/unittests/basic_string_view/include.cc
 delete mode 100644 gdb/unittests/basic_string_view/inserters/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/inserters/char/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/inserters/char/3.cc
 delete mode 100644 gdb/unittests/basic_string_view/inserters/pod/10081-out.cc
 delete mode 100644 gdb/unittests/basic_string_view/inserters/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/inserters/wchar_t/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/inserters/wchar_t/3.cc
 delete mode 100644 gdb/unittests/basic_string_view/literals/types.cc
 delete mode 100644 gdb/unittests/basic_string_view/literals/values.cc
 delete mode 100644 gdb/unittests/basic_string_view/modifiers/remove_prefix/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/modifiers/remove_suffix/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/modifiers/swap/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/modifiers/swap/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/compare/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/compare/char/13650.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/compare/char/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/compare/char/70483.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/compare/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/compare/wchar_t/13650.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/compare/wchar_t/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/copy/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/copy/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/data/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/data/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/find/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/find/char/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/find/char/3.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/find/char/4.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/find/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/find/wchar_t/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/find/wchar_t/3.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/find/wchar_t/4.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/rfind/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/rfind/char/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/rfind/char/3.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/rfind/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/rfind/wchar_t/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/rfind/wchar_t/3.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/string_conversion/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/substr/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operations/substr/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/operators/char/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/operators/wchar_t/2.cc
 delete mode 100644 gdb/unittests/basic_string_view/range_access/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/range_access/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/requirements/explicit_instantiation/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc
 delete mode 100644 gdb/unittests/basic_string_view/requirements/typedefs.cc
 delete mode 100644 gdb/unittests/basic_string_view/typedefs.cc
 delete mode 100644 gdb/unittests/basic_string_view/types/1.cc
 delete mode 100644 gdb/unittests/optional-selftests.c
 delete mode 100644 gdb/unittests/optional/assignment/1.cc
 delete mode 100644 gdb/unittests/optional/assignment/2.cc
 delete mode 100644 gdb/unittests/optional/assignment/3.cc
 delete mode 100644 gdb/unittests/optional/assignment/4.cc
 delete mode 100644 gdb/unittests/optional/assignment/5.cc
 delete mode 100644 gdb/unittests/optional/assignment/6.cc
 delete mode 100644 gdb/unittests/optional/assignment/7.cc
 delete mode 100644 gdb/unittests/optional/cons/copy.cc
 delete mode 100644 gdb/unittests/optional/cons/default.cc
 delete mode 100644 gdb/unittests/optional/cons/move.cc
 delete mode 100644 gdb/unittests/optional/cons/value.cc
 delete mode 100644 gdb/unittests/optional/in_place.cc
 delete mode 100644 gdb/unittests/optional/observers/1.cc
 delete mode 100644 gdb/unittests/optional/observers/2.cc
 delete mode 100644 gdb/unittests/string_view-selftests.c
 delete mode 100644 gdbsupport/gdb_optional.h
 delete mode 100644 gdbsupport/gdb_string_view.h
 delete mode 100644 gdbsupport/gdb_string_view.tcc
 delete mode 100644 gdbsupport/invoke-result.h


base-commit: 9326300e4d3dbe943380b30766ed474d98df07ba
  

Comments

Tom Tromey Oct. 16, 2023, 7:43 p.m. UTC | #1
>>>>> "Lancelot" == Lancelot Six <lancelot.six@amd.com> writes:

Lancelot> This series is a followup of the discussions from last Cauldron and Tom's
Lancelot> RFC patch[1] regarding requiring C++17 in GDB.  It seems that the
Lancelot> overall sentiment is positive for such move, so here is a proper series.

Hi.  I've sent a few minor comments, but otherwise everything looks good
to me.

Thank you for doing this.

Approved-By: Tom Tromey <tom@tromey.com>

I'm giving my approval but this should probably wait a little for others
to comment as well.


FWIW I have a follow-up series I'll send after testing is done.  I found
a number of other fairly straightforward C++17 changes.

Tom
  
Pedro Alves Oct. 16, 2023, 9:53 p.m. UTC | #2
On 2023-10-16 20:43, Tom Tromey wrote:
>>>>>> "Lancelot" == Lancelot Six <lancelot.six@amd.com> writes:
> 
> Lancelot> This series is a followup of the discussions from last Cauldron and Tom's
> Lancelot> RFC patch[1] regarding requiring C++17 in GDB.  It seems that the
> Lancelot> overall sentiment is positive for such move, so here is a proper series.
> 
> Hi.  I've sent a few minor comments, but otherwise everything looks good
> to me.
> 
> Thank you for doing this.

Ditto.

> 
> Approved-By: Tom Tromey <tom@tromey.com>
> 
> I'm giving my approval but this should probably wait a little for others
> to comment as well.

and ditto here too.  You can add mine:

  Approved-By: Pedro Alves <pedro@palves.net>
  
Lancelot SIX Oct. 23, 2023, 1:42 p.m. UTC | #3
>> Lancelot> This series is a followup of the discussions from last Cauldron and Tom's
>> Lancelot> RFC patch[1] regarding requiring C++17 in GDB.  It seems that the
>> Lancelot> overall sentiment is positive for such move, so here is a proper series.
>>
>> Hi.  I've sent a few minor comments, but otherwise everything looks good
>> to me.
>>
>> Thank you for doing this.
> 
> Ditto.
> 
>>
>> Approved-By: Tom Tromey <tom@tromey.com>
>>
>> I'm giving my approval but this should probably wait a little for others
>> to comment as well.
> 
> and ditto here too.  You can add mine:
> 
>    Approved-By: Pedro Alves <pedro@palves.net>
> 

Hi all,

I think I'll wait until about the end of the week and will push the 
first 2 patches of the series.  This will make master require C++17 but 
not actually use C++17 yet.  I'll give a bit more time for the rest of 
the series, so if it causes problems to anyone, it is still easy to revert.

Best,
Lancelot.
  
Lancelot SIX Oct. 28, 2023, 8:48 p.m. UTC | #4
On Mon, Oct 23, 2023 at 02:42:18PM +0100, Lancelot SIX wrote:
> 
> > > Lancelot> This series is a followup of the discussions from last Cauldron and Tom's
> > > Lancelot> RFC patch[1] regarding requiring C++17 in GDB.  It seems that the
> > > Lancelot> overall sentiment is positive for such move, so here is a proper series.
> > > 
> > > Hi.  I've sent a few minor comments, but otherwise everything looks good
> > > to me.
> > > 
> > > Thank you for doing this.
> > 
> > Ditto.
> > 
> > > 
> > > Approved-By: Tom Tromey <tom@tromey.com>
> > > 
> > > I'm giving my approval but this should probably wait a little for others
> > > to comment as well.
> > 
> > and ditto here too.  You can add mine:
> > 
> >    Approved-By: Pedro Alves <pedro@palves.net>
> > 
> 
> Hi all,
> 
> I think I'll wait until about the end of the week and will push the first 2
> patches of the series.  This will make master require C++17 but not actually
> use C++17 yet.  I'll give a bit more time for the rest of the series, so if
> it causes problems to anyone, it is still easy to revert.
> 
> Best,
> Lancelot.

Hi all,

I have pushed the first 2 patches of the series (including the missing
update in gdb/README):
- eb4de4047d8 gdb/ax_cxx_compile_stdcxx.m4: upgrade
- f74dc26792a gdb/gdbsupport/gdbserver: Require c++17

I'll wait a bit more before applying the rest of the series.  The intent
is to have a time-window where C++17 is required but not extensively
used so it is still "easy" to revert the change is someone strongly
objects to it.

I think I'll wait at least a week or two before considering pushing the
rest of the series.

Best,
Lancelot.