Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/3] Small cleanups in macro code
Date: Sun, 28 Jun 2020 12:56:25 -0400	[thread overview]
Message-ID: <20200628165628.96730-1-simon.marchi@polymtl.ca> (raw)

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



             reply	other threads:[~2020-06-28 16:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-28 16:56 Simon Marchi [this message]
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

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=20200628165628.96730-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