From: Joel Brobecker <brobecker@adacore.com>
To: Pedro Alves <palves@redhat.com>
Cc: "Agovic, Sanimir" <sanimir.agovic@intel.com>,
'Mark Kettenis' <mark.kettenis@xs4all.nl>,
"ooprala@redhat.com" <ooprala@redhat.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: C++-compat clean build
Date: Tue, 01 Oct 2013 16:34:00 -0000 [thread overview]
Message-ID: <20131001163359.GA28649@adacore.com> (raw)
In-Reply-To: <524AD936.7060604@redhat.com>
> We have several uses of these macros already in the tree.
> They seem to have the advantage that they hide the casts and perhaps
> make the intention of the code clearer while we can't use new/new[].
> E.g., XNEW prevents errors of the type:
>
> struct foo *f = (struct foo *) xmalloc (sizeof (f));
>
> We already use these macros in gdb in several places.
> Not sure what people feel about using them more?
FWIW, I have no real strong opinion. If the casts become necessary,
and they allow us to hide them, I think they indeed would be useful.
--
Joel
next prev parent reply other threads:[~2013-10-01 16:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-01 11:25 Ondrej Oprala
2013-10-01 11:52 ` Ondrej Oprala
2013-10-01 12:04 ` Mark Kettenis
2013-10-01 12:53 ` Agovic, Sanimir
2013-10-01 14:16 ` Pedro Alves
2013-10-01 16:34 ` Joel Brobecker [this message]
2013-10-01 12:53 ` Jan Kratochvil
2013-10-01 12:57 ` Ondrej Oprala
2013-10-01 13:06 ` Tedeschi, Walfred
2013-10-01 13:57 ` Pedro Alves
2013-10-03 20:39 ` Tom Tromey
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=20131001163359.GA28649@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
--cc=ooprala@redhat.com \
--cc=palves@redhat.com \
--cc=sanimir.agovic@intel.com \
/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