public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Small cleanups in macro code
@ 2020-06-28 16:56 Simon Marchi
  2020-06-28 16:56 ` [PATCH 1/3] gdb: remove callback in macro expand functions Simon Marchi
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Simon Marchi @ 2020-06-28 16:56 UTC (permalink / raw)
  To: gdb-patches

I am trying to fix this warning given by clang-10, which points out that we
have a user-defined destructor in class macro_buffer, but no user-defined copy
constructor:

      CXX    macroexp.o
    /home/simark/src/binutils-gdb/gdb/macroexp.c:125:3: error: definition of implicit copy constructor for 'macro_buffer' is deprecated because it has a user-declared destructor [-Werror,-Wdeprecated-copy-dtor]
      ~macro_buffer ()
      ^

I still have not managed to untangle this code, but I came up with this small
cleanups which should be quite obvious.

Simon Marchi (3):
  gdb: remove callback in macro expand functions
  gdb: make macro_expand_next return a gdb::unique_xmalloc_ptr<char>
  gdb: make macro_stringify return a gdb::unique_xmalloc_ptr<char>

 gdb/c-exp.y      | 19 +++++---------
 gdb/macrocmd.c   | 22 ++++++++--------
 gdb/macroexp.c   | 67 +++++++++++++++++++-----------------------------
 gdb/macroexp.h   | 59 ++++++++++++++++--------------------------
 gdb/macroscope.c | 14 +++++-----
 gdb/macroscope.h |  9 +++----
 gdb/macrotab.c   | 14 +++-------
 7 files changed, 79 insertions(+), 125 deletions(-)

-- 
2.27.0


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

end of thread, other threads:[~2020-07-04  2:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-28 16:56 [PATCH 0/3] Small cleanups in macro code Simon Marchi
2020-06-28 16:56 ` [PATCH 1/3] gdb: remove callback in macro expand functions Simon Marchi
2020-06-30 20:47   ` Tom Tromey
2020-06-30 22:14     ` Matt Rice
2020-06-30 22:26       ` Simon Marchi
2020-06-28 16:56 ` [PATCH 2/3] gdb: make macro_expand_next return a gdb::unique_xmalloc_ptr<char> Simon Marchi
2020-06-30 20:53   ` Tom Tromey
2020-06-30 22:26     ` Simon Marchi
2020-06-28 16:56 ` [PATCH 3/3] gdb: make macro_stringify " Simon Marchi
2020-06-30 20:55   ` Tom Tromey
2020-07-01  0:26     ` Simon Marchi
2020-07-01 15:36       ` Tom Tromey
2020-07-04  2:28         ` Simon Marchi

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