public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/7] [gdb/build] Fix -std=c++20 issues
@ 2023-08-15 18:13 Tom de Vries
  2023-08-15 18:13 ` [PATCH 1/7] [gdb/build, c++20] Fix Wdeprecated-enum-enum-conversion Tom de Vries
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Tom de Vries @ 2023-08-15 18:13 UTC (permalink / raw)
  To: gdb-patches

I tried building gdb using -std=c++20, an ran into a few issues.

This series contains fixes for most of them.

I ran into a problem in a libguile header file, I've worked around that by
disabling guile support.  I'll file a PR about this.

The final patch, "[gdb/build, c++20] Handle deprecated
std::allocator::construct", exposes two problems where a gdb::byte_vector is
returned and consequently copied.

I have fix for one of those, patch "[gdb/build] Return reference in
target_read_auxv".

But the other one, in remote_target::thread_info_to_thread_handle remains
unfixed:
...
gdb::byte_vector
remote_target::thread_info_to_thread_handle (struct thread_info *tp)
{
  remote_thread_info *priv = get_remote_thread_info (tp);
  return priv->thread_handle;
}
...

I wrote a patch for this, which allowed me to finish the build with
-std=c++20, but it causes a regression in gdb.python/py-thrhandle.exp, so it's
not included in this series.

Tested on x86_64-linux, with:
- gcc 7.5.0 -std=c++11, and
- gcc 12.3.0 -std=c++17.

Build on x86_64-linux, with:
- gcc 12.3.0 -std=c++20, which runs into the single error mentioned above.

Tom de Vries (7):
  [gdb/build, c++20] Fix Wdeprecated-enum-enum-conversion
  [gdb/build, c++20] Stop using deprecated is_pod
  [gdb/build, c++20] Fix DISABLE_COPY_AND_ASSIGN use in ui_out_emit_type
  [gdb/build, c++20] Fix deprecated implicit capture of this
  [gdb/build, c++20] Fix invalid conversion in test_symbols
  [gdb/build] Return reference in target_read_auxv
  [gdb/build, c++20] Handle deprecated std::allocator::construct

 gdb/ada-lang.c                  |  2 +-
 gdb/arm-fbsd-tdep.c             |  2 +-
 gdb/auxv.c                      |  6 +++---
 gdb/auxv.h                      |  2 +-
 gdb/dwarf2/read.c               |  2 +-
 gdb/ravenscar-thread.c          |  2 +-
 gdb/remote.c                    | 14 +++++++++-----
 gdb/rs6000-tdep.c               |  3 ++-
 gdb/ui-out.h                    |  2 +-
 gdb/unittests/ptid-selftests.c  |  4 +++-
 gdbsupport/common-exceptions.h  |  4 +++-
 gdbsupport/default-init-alloc.h | 13 ++++++++++++-
 gdbsupport/poison.h             |  2 +-
 13 files changed, 39 insertions(+), 19 deletions(-)


base-commit: 2a3f442df9e9a71f9e3c4c5999a2c53bf93e488d
-- 
2.35.3


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-08-21 11:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-15 18:13 [PATCH 0/7] [gdb/build] Fix -std=c++20 issues Tom de Vries
2023-08-15 18:13 ` [PATCH 1/7] [gdb/build, c++20] Fix Wdeprecated-enum-enum-conversion Tom de Vries
2023-08-15 18:13 ` [PATCH 2/7] [gdb/build, c++20] Stop using deprecated is_pod Tom de Vries
2023-08-15 18:13 ` [PATCH 3/7] [gdb/build, c++20] Fix DISABLE_COPY_AND_ASSIGN use in ui_out_emit_type Tom de Vries
2023-08-15 18:13 ` [PATCH 4/7] [gdb/build, c++20] Fix deprecated implicit capture of this Tom de Vries
2023-08-15 18:13 ` [PATCH 5/7] [gdb/build, c++20] Fix invalid conversion in test_symbols Tom de Vries
2023-08-15 18:13 ` [PATCH 6/7] [gdb/build] Return reference in target_read_auxv Tom de Vries
2023-08-16 18:23   ` Tom Tromey
2023-08-15 18:13 ` [PATCH 7/7] [gdb/build, c++20] Handle deprecated std::allocator::construct Tom de Vries
2023-08-16 18:27 ` [PATCH 0/7] [gdb/build] Fix -std=c++20 issues Tom Tromey
2023-08-21 11:04   ` Tom de Vries

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).