This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 00/13] more minor constification
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>, gdb-patches at sourceware dot org
- Date: Thu, 24 Jul 2014 03:09:36 +0100
- Subject: Re: [PATCH 00/13] more minor constification
- Authentication-results: sourceware.org; auth=none
- References: <1406055319-26380-1-git-send-email-tromey at redhat dot com>
On 07/22/2014 07:55 PM, Tom Tromey wrote:
> This series is some more minor constification for gdb.
>
> Patches 10, 11, and 12 contain what might be considered minor hacks.
> Some command fields are generally visible to gdb (the struct is not
> opaque) but are conceptually const. However there are cases where the
> fields are in fact freed when the command object is destroyed.
>
> I chose to cast away const at these points, on the theory that
> const-correctness for the bulk of the code is outweighs the cost of
> this hack.
That all looked fine to me. That's just working as C intended.
Thanks for doing all this.
Pedro Alves